Class: Azure::ARM::Network::Models::NetworkInterfacePropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::NetworkInterfacePropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/models/network_interface_properties_format.rb
Overview
NetworkInterface properties.
Instance Attribute Summary collapse
-
#dns_settings ⇒ NetworkInterfaceDnsSettings
NetworkInterface.
-
#enable_ipforwarding ⇒ Boolean
NIC.
-
#ip_configurations ⇒ Array<NetworkInterfaceIPConfiguration>
IPConfigurations of the NetworkInterface.
-
#mac_address ⇒ String
Gets the MAC Address of the network interface.
-
#network_security_group ⇒ NetworkSecurityGroup
NetworkSecurityGroup resource.
-
#primary ⇒ Boolean
machine.
-
#provisioning_state ⇒ String
resource Updating/Deleting/Failed.
-
#resource_guid ⇒ String
interface resource.
-
#virtual_machine ⇒ SubResource
Gets or sets the reference of a VirtualMachine.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ NetworkInterfacePropertiesFormat
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#dns_settings ⇒ NetworkInterfaceDnsSettings
NetworkInterface
28 29 30 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 28 def dns_settings @dns_settings end |
#enable_ipforwarding ⇒ Boolean
NIC
39 40 41 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 39 def enable_ipforwarding @enable_ipforwarding end |
#ip_configurations ⇒ Array<NetworkInterfaceIPConfiguration>
IPConfigurations of the NetworkInterface
24 25 26 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 24 def ip_configurations @ip_configurations end |
#mac_address ⇒ String
Returns Gets the MAC Address of the network interface.
31 32 33 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 31 def mac_address @mac_address end |
#network_security_group ⇒ NetworkSecurityGroup
NetworkSecurityGroup resource
20 21 22 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 20 def network_security_group @network_security_group end |
#primary ⇒ Boolean
machine
35 36 37 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 35 def primary @primary end |
#provisioning_state ⇒ String
resource Updating/Deleting/Failed
47 48 49 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 47 def provisioning_state @provisioning_state end |
#resource_guid ⇒ String
interface resource
43 44 45 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 43 def resource_guid @resource_guid end |
#virtual_machine ⇒ SubResource
Returns Gets or sets the reference of a VirtualMachine.
16 17 18 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 16 def virtual_machine @virtual_machine end |
Class Method Details
.deserialize_object(object) ⇒ NetworkInterfacePropertiesFormat
Deserializes given Ruby Hash into Model object.
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 122 def self.deserialize_object(object) return if object.nil? output_object = NetworkInterfacePropertiesFormat.new deserialized_property = object['virtualMachine'] unless deserialized_property.nil? deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property) end output_object.virtual_machine = deserialized_property deserialized_property = object['networkSecurityGroup'] unless deserialized_property.nil? deserialized_property = NetworkSecurityGroup.deserialize_object(deserialized_property) end output_object.network_security_group = deserialized_property deserialized_property = object['ipConfigurations'] unless deserialized_property.nil? deserialized_array = [] deserialized_property.each do |element1| unless element1.nil? element1 = NetworkInterfaceIPConfiguration.deserialize_object(element1) end deserialized_array.push(element1) end deserialized_property = deserialized_array end output_object.ip_configurations = deserialized_property deserialized_property = object['dnsSettings'] unless deserialized_property.nil? deserialized_property = NetworkInterfaceDnsSettings.deserialize_object(deserialized_property) end output_object.dns_settings = deserialized_property deserialized_property = object['macAddress'] output_object.mac_address = deserialized_property deserialized_property = object['primary'] output_object.primary = deserialized_property deserialized_property = object['enableIPForwarding'] output_object.enable_ipforwarding = deserialized_property deserialized_property = object['resourceGuid'] output_object.resource_guid = deserialized_property deserialized_property = object['provisioningState'] output_object.provisioning_state = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 64 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.virtual_machine unless serialized_property.nil? serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property) end output_object['virtualMachine'] = serialized_property unless serialized_property.nil? serialized_property = object.network_security_group unless serialized_property.nil? serialized_property = NetworkSecurityGroup.serialize_object(serialized_property) end output_object['networkSecurityGroup'] = serialized_property unless serialized_property.nil? serialized_property = object.ip_configurations unless serialized_property.nil? serializedArray = [] serialized_property.each do |element| unless element.nil? element = NetworkInterfaceIPConfiguration.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['ipConfigurations'] = serialized_property unless serialized_property.nil? serialized_property = object.dns_settings unless serialized_property.nil? serialized_property = NetworkInterfaceDnsSettings.serialize_object(serialized_property) end output_object['dnsSettings'] = serialized_property unless serialized_property.nil? serialized_property = object.mac_address output_object['macAddress'] = serialized_property unless serialized_property.nil? serialized_property = object.primary output_object['primary'] = serialized_property unless serialized_property.nil? serialized_property = object.enable_ipforwarding output_object['enableIPForwarding'] = serialized_property unless serialized_property.nil? serialized_property = object.resource_guid output_object['resourceGuid'] = serialized_property unless serialized_property.nil? serialized_property = object.provisioning_state output_object['provisioningState'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
52 53 54 55 56 57 |
# File 'lib/azure_mgmt_network/models/network_interface_properties_format.rb', line 52 def validate @virtual_machine.validate unless @virtual_machine.nil? @network_security_group.validate unless @network_security_group.nil? @ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.nil? @dns_settings.validate unless @dns_settings.nil? end |