Class: Google::Apis::SecuritycenterV1::PortRange

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/securitycenter_v1/classes.rb,
lib/google/apis/securitycenter_v1/representations.rb,
lib/google/apis/securitycenter_v1/representations.rb

Overview

A port range which is inclusive of the min and max values. Values are between 0 and 2^16-1. The max can be equal / must be not smaller than the min value. If min and max are equal this indicates that it is a single port.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PortRange

Returns a new instance of PortRange.



12643
12644
12645
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 12643

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#maxFixnum

Maximum port value. Corresponds to the JSON property max

Returns:

  • (Fixnum)


12636
12637
12638
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 12636

def max
  @max
end

#minFixnum

Minimum port value. Corresponds to the JSON property min

Returns:

  • (Fixnum)


12641
12642
12643
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 12641

def min
  @min
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12648
12649
12650
12651
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 12648

def update!(**args)
  @max = args[:max] if args.key?(:max)
  @min = args[:min] if args.key?(:min)
end