Class: Google::Apis::ComputeAlpha::NetworkInterfaceSubInterface

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkInterfaceSubInterface

Returns a new instance of NetworkInterfaceSubInterface.



29134
29135
29136
# File 'lib/google/apis/compute_alpha/classes.rb', line 29134

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

Instance Attribute Details

#ip_addressString

An IPv4 internal IP address to assign to the instance for this subinterface. If specified, ip_allocation_mode should be set to ALLOCATE_IP. Corresponds to the JSON property ipAddress

Returns:

  • (String)


29111
29112
29113
# File 'lib/google/apis/compute_alpha/classes.rb', line 29111

def ip_address
  @ip_address
end

#ip_allocation_modeString

Corresponds to the JSON property ipAllocationMode

Returns:

  • (String)


29116
29117
29118
# File 'lib/google/apis/compute_alpha/classes.rb', line 29116

def ip_allocation_mode
  @ip_allocation_mode
end

#subnetworkString

If specified, this subnetwork must belong to the same network as that of the network interface. If not specified the subnet of network interface will be used. If you specify this property, you can specify the subnetwork as a full or partial URL. For example, the following are all valid URLs: - https://www. googleapis.com/compute/v1/projects/project/regions/region /subnetworks/ subnetwork - regions/region/subnetworks/subnetwork Corresponds to the JSON property subnetwork

Returns:

  • (String)


29126
29127
29128
# File 'lib/google/apis/compute_alpha/classes.rb', line 29126

def subnetwork
  @subnetwork
end

#vlanFixnum

VLAN tag. Should match the VLAN(s) supported by the subnetwork to which this subinterface is connecting. Corresponds to the JSON property vlan

Returns:

  • (Fixnum)


29132
29133
29134
# File 'lib/google/apis/compute_alpha/classes.rb', line 29132

def vlan
  @vlan
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



29139
29140
29141
29142
29143
29144
# File 'lib/google/apis/compute_alpha/classes.rb', line 29139

def update!(**args)
  @ip_address = args[:ip_address] if args.key?(:ip_address)
  @ip_allocation_mode = args[:ip_allocation_mode] if args.key?(:ip_allocation_mode)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
  @vlan = args[:vlan] if args.key?(:vlan)
end