Class: Google::Apis::WorkstationsV1::PortRange

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

Overview

A PortRange defines a range of ports. Both first and last are inclusive. To specify a single port, both first and last should be the same.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PortRange

Returns a new instance of PortRange.



1593
1594
1595
# File 'lib/google/apis/workstations_v1/classes.rb', line 1593

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

Instance Attribute Details

#firstFixnum

Required. Starting port number for the current range of ports. Valid ports are 22, 80, and ports within the range 1024-65535. Corresponds to the JSON property first

Returns:

  • (Fixnum)


1585
1586
1587
# File 'lib/google/apis/workstations_v1/classes.rb', line 1585

def first
  @first
end

#lastFixnum

Required. Ending port number for the current range of ports. Valid ports are 22, 80, and ports within the range 1024-65535. Corresponds to the JSON property last

Returns:

  • (Fixnum)


1591
1592
1593
# File 'lib/google/apis/workstations_v1/classes.rb', line 1591

def last
  @last
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1598
1599
1600
1601
# File 'lib/google/apis/workstations_v1/classes.rb', line 1598

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