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.



987
988
989
# File 'lib/google/apis/notebooks_v2/classes.rb', line 987

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)


973
974
975
# File 'lib/google/apis/notebooks_v2/classes.rb', line 973

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)


979
980
981
# File 'lib/google/apis/notebooks_v2/classes.rb', line 979

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)


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

def subnet
  @subnet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



992
993
994
995
996
# File 'lib/google/apis/notebooks_v2/classes.rb', line 992

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