Class: Google::Apis::NetworkmanagementV1::NetworkInterface

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

Overview

Message describing network interfaces.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkInterface

Returns a new instance of NetworkInterface.



2810
2811
2812
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2810

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

Instance Attribute Details

#adapter_descriptionString

Output only. The description of the interface. Corresponds to the JSON property adapterDescription

Returns:

  • (String)


2777
2778
2779
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2777

def adapter_description
  @adapter_description
end

#cidrString

Output only. The IP address of the interface and subnet mask in CIDR format. Examples: 192.168.1.0/24, 2001:db8::/32 Corresponds to the JSON property cidr

Returns:

  • (String)


2783
2784
2785
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2783

def cidr
  @cidr
end

#interface_nameString

Output only. The name of the network interface. Examples: eth0, eno1 Corresponds to the JSON property interfaceName

Returns:

  • (String)


2788
2789
2790
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2788

def interface_name
  @interface_name
end

#ip_addressString

Output only. The IP address of the interface. Corresponds to the JSON property ipAddress

Returns:

  • (String)


2793
2794
2795
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2793

def ip_address
  @ip_address
end

#mac_addressString

Output only. The MAC address of the interface. Corresponds to the JSON property macAddress

Returns:

  • (String)


2798
2799
2800
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2798

def mac_address
  @mac_address
end

#speedFixnum

Output only. Speed of the interface in millions of bits per second. Corresponds to the JSON property speed

Returns:

  • (Fixnum)


2803
2804
2805
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2803

def speed
  @speed
end

#vlan_idFixnum

Output only. The id of the VLAN. Corresponds to the JSON property vlanId

Returns:

  • (Fixnum)


2808
2809
2810
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2808

def vlan_id
  @vlan_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2815
2816
2817
2818
2819
2820
2821
2822
2823
# File 'lib/google/apis/networkmanagement_v1/classes.rb', line 2815

def update!(**args)
  @adapter_description = args[:adapter_description] if args.key?(:adapter_description)
  @cidr = args[:cidr] if args.key?(:cidr)
  @interface_name = args[:interface_name] if args.key?(:interface_name)
  @ip_address = args[:ip_address] if args.key?(:ip_address)
  @mac_address = args[:mac_address] if args.key?(:mac_address)
  @speed = args[:speed] if args.key?(:speed)
  @vlan_id = args[:vlan_id] if args.key?(:vlan_id)
end