Class: Google::Apis::VmmigrationV1alpha1::NetworkInterface

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

Overview

NetworkInterface represents a NIC of a VM.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkInterface

Returns a new instance of NetworkInterface.



1524
1525
1526
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1524

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

Instance Attribute Details

#external_ipString

The external IP to define in the NIC. Corresponds to the JSON property externalIp

Returns:

  • (String)


1506
1507
1508
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1506

def external_ip
  @external_ip
end

#internal_ipString

The internal IP to define in the NIC. The formats accepted are: ephemeral \ ipv4 address \ a named address resource full path. Corresponds to the JSON property internalIp

Returns:

  • (String)


1512
1513
1514
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1512

def internal_ip
  @internal_ip
end

#networkString

The network to connect the NIC to. Corresponds to the JSON property network

Returns:

  • (String)


1517
1518
1519
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1517

def network
  @network
end

#subnetworkString

The subnetwork to connect the NIC to. Corresponds to the JSON property subnetwork

Returns:

  • (String)


1522
1523
1524
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1522

def subnetwork
  @subnetwork
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1529
1530
1531
1532
1533
1534
# File 'lib/google/apis/vmmigration_v1alpha1/classes.rb', line 1529

def update!(**args)
  @external_ip = args[:external_ip] if args.key?(:external_ip)
  @internal_ip = args[:internal_ip] if args.key?(:internal_ip)
  @network = args[:network] if args.key?(:network)
  @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
end