Class: Google::Apis::NotebooksV2::NetworkInterface

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

Overview

The definition of a network interface resource attached to a VM.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkInterface

Returns a new instance of NetworkInterface.



984
985
986
# File 'lib/google/apis/notebooks_v2/classes.rb', line 984

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

Instance Attribute Details

#networkString

Optional. The name of the VPC that this VM instance is in. Format: projects/ project_id/global/networks/network_id` Corresponds to the JSON propertynetwork`

Returns:

  • (String)


970
971
972
# File 'lib/google/apis/notebooks_v2/classes.rb', line 970

def network
  @network
end

#nic_typeString

Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet. Corresponds to the JSON property nicType

Returns:

  • (String)


976
977
978
# File 'lib/google/apis/notebooks_v2/classes.rb', line 976

def nic_type
  @nic_type
end

#subnetString

Optional. The name of the subnet that this VM instance is in. Format: projects/project_id/regions/region/subnetworks/subnetwork_id` Corresponds to the JSON propertysubnet`

Returns:

  • (String)


982
983
984
# File 'lib/google/apis/notebooks_v2/classes.rb', line 982

def subnet
  @subnet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



989
990
991
992
993
# File 'lib/google/apis/notebooks_v2/classes.rb', line 989

def update!(**args)
  @network = args[:network] if args.key?(:network)
  @nic_type = args[:nic_type] if args.key?(:nic_type)
  @subnet = args[:subnet] if args.key?(:subnet)
end