Class: Azure::ARM::Web::Models::ResourceNameAvailability
- Inherits:
-
Object
- Object
- Azure::ARM::Web::Models::ResourceNameAvailability
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_web/models/resource_name_availability.rb
Overview
Describes if a resource name is available
Instance Attribute Summary collapse
- #message ⇒ String
-
#name_available ⇒ Boolean
indicates the name is invalid, unavailable, or both.
-
#reason ⇒ String
indicates the name provided does not match Azure WebApp service’s naming requirements.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ ResourceNameAvailability
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
#message ⇒ String
26 27 28 |
# File 'lib/azure_mgmt_web/models/resource_name_availability.rb', line 26 def end |
#name_available ⇒ Boolean
indicates the name is invalid, unavailable, or both.
17 18 19 |
# File 'lib/azure_mgmt_web/models/resource_name_availability.rb', line 17 def name_available @name_available end |
#reason ⇒ String
indicates the name provided does not match Azure WebApp service’s naming requirements. ‘AlreadyExists’ indicates that the name is already in use and is therefore unavailable.
23 24 25 |
# File 'lib/azure_mgmt_web/models/resource_name_availability.rb', line 23 def reason @reason end |
Class Method Details
.deserialize_object(object) ⇒ ResourceNameAvailability
Deserializes given Ruby Hash into Model object.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/azure_mgmt_web/models/resource_name_availability.rb', line 61 def self.deserialize_object(object) return if object.nil? output_object = ResourceNameAvailability.new deserialized_property = object['nameAvailable'] output_object.name_available = deserialized_property deserialized_property = object['reason'] output_object.reason = deserialized_property deserialized_property = object['message'] output_object. = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/azure_mgmt_web/models/resource_name_availability.rb', line 40 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name_available output_object['nameAvailable'] = serialized_property unless serialized_property.nil? serialized_property = object.reason output_object['reason'] = serialized_property unless serialized_property.nil? serialized_property = object. output_object['message'] = 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 |
# File 'lib/azure_mgmt_web/models/resource_name_availability.rb', line 31 def validate # Nothing to validate end |