Class: Azure::ARM::Network::Models::SubnetPropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::SubnetPropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/models/subnet_properties_format.rb
Overview
Model object.
Instance Attribute Summary collapse
-
#address_prefix ⇒ String
Gets or sets Address prefix for the subnet.
-
#ip_configurations ⇒ Array<IPConfiguration>
network interface IP configurations using subnet.
-
#network_security_group ⇒ NetworkSecurityGroup
NetworkSecurityGroup resource.
-
#provisioning_state ⇒ String
resource Updating/Deleting/Failed.
-
#route_table ⇒ RouteTable
resource.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ SubnetPropertiesFormat
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
#address_prefix ⇒ String
Returns Gets or sets Address prefix for the subnet.
16 17 18 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 16 def address_prefix @address_prefix end |
#ip_configurations ⇒ Array<IPConfiguration>
network interface IP configurations using subnet
28 29 30 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 28 def ip_configurations @ip_configurations end |
#network_security_group ⇒ NetworkSecurityGroup
NetworkSecurityGroup resource
20 21 22 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 20 def network_security_group @network_security_group end |
#provisioning_state ⇒ String
resource Updating/Deleting/Failed
32 33 34 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 32 def provisioning_state @provisioning_state end |
#route_table ⇒ RouteTable
resource
24 25 26 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 24 def route_table @route_table end |
Class Method Details
.deserialize_object(object) ⇒ SubnetPropertiesFormat
Deserializes given Ruby Hash into Model object.
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 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 91 def self.deserialize_object(object) return if object.nil? output_object = SubnetPropertiesFormat.new deserialized_property = object['addressPrefix'] output_object.address_prefix = 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['routeTable'] unless deserialized_property.nil? deserialized_property = RouteTable.deserialize_object(deserialized_property) end output_object.route_table = deserialized_property deserialized_property = object['ipConfigurations'] unless deserialized_property.nil? deserialized_array = [] deserialized_property.each do |element1| unless element1.nil? element1 = IPConfiguration.deserialize_object(element1) end deserialized_array.push(element1) end deserialized_property = deserialized_array end output_object.ip_configurations = 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.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 48 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.address_prefix output_object['addressPrefix'] = 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.route_table unless serialized_property.nil? serialized_property = RouteTable.serialize_object(serialized_property) end output_object['routeTable'] = 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 = IPConfiguration.serialize_object(element) end serializedArray.push(element) end serialized_property = serializedArray end output_object['ipConfigurations'] = 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.
37 38 39 40 41 |
# File 'lib/azure_mgmt_network/models/subnet_properties_format.rb', line 37 def validate @network_security_group.validate unless @network_security_group.nil? @route_table.validate unless @route_table.nil? @ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.nil? end |