Class: Azure::ARM::Resources::Models::ProviderResourceType
- Inherits:
-
Object
- Object
- Azure::ARM::Resources::Models::ProviderResourceType
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_resources/models/provider_resource_type.rb
Overview
Resource type managed by the resource provider.
Instance Attribute Summary collapse
-
#api_versions ⇒ Array<String>
Gets or sets the api version.
-
#locations ⇒ Array<String>
this resource type can be created in.
-
#properties ⇒ Hash{String => String}
Gets or sets the properties.
-
#resource_type ⇒ String
Gets or sets the resource type.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ProviderResourceType
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
#api_versions ⇒ Array<String>
Returns Gets or sets the api version.
23 24 25 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 23 def api_versions @api_versions end |
#locations ⇒ Array<String>
this resource type can be created in.
20 21 22 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 20 def locations @locations end |
#properties ⇒ Hash{String => String}
Returns Gets or sets the properties.
26 27 28 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 26 def properties @properties end |
#resource_type ⇒ String
Returns Gets or sets the resource type.
16 17 18 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 16 def resource_type @resource_type end |
Class Method Details
.deserialize_object(object) ⇒ ProviderResourceType
Deserializes given Ruby Hash into Model object.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 66 def self.deserialize_object(object) return if object.nil? output_object = ProviderResourceType.new deserialized_property = object['resourceType'] output_object.resource_type = deserialized_property deserialized_property = object['locations'] output_object.locations = deserialized_property deserialized_property = object['apiVersions'] output_object.api_versions = deserialized_property deserialized_property = object['properties'] output_object.properties = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 42 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.resource_type output_object['resourceType'] = serialized_property unless serialized_property.nil? serialized_property = object.locations output_object['locations'] = serialized_property unless serialized_property.nil? serialized_property = object.api_versions output_object['apiVersions'] = serialized_property unless serialized_property.nil? serialized_property = object.properties output_object['properties'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
31 32 33 34 35 |
# File 'lib/azure_mgmt_resources/models/provider_resource_type.rb', line 31 def validate @locations.each{ |e| e.validate if e.respond_to?(:validate) } unless @locations.nil? @api_versions.each{ |e| e.validate if e.respond_to?(:validate) } unless @api_versions.nil? @properties.each{ |e| e.validate if e.respond_to?(:validate) } unless @properties.nil? end |