Class: Google::Apis::WorkstationsV1beta::PortRange

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PortRange

Returns a new instance of PortRange.



1327
1328
1329
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1327

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

Instance Attribute Details

#firstFixnum

Required. Starting port number for the current range of ports. Corresponds to the JSON property first

Returns:

  • (Fixnum)


1320
1321
1322
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1320

def first
  @first
end

#lastFixnum

Required. Ending port number for the current range of ports. Corresponds to the JSON property last

Returns:

  • (Fixnum)


1325
1326
1327
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1325

def last
  @last
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1332
1333
1334
1335
# File 'lib/google/apis/workstations_v1beta/classes.rb', line 1332

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