Class: Azure::ARM::Compute::Models::KeyVaultKeyReference
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::KeyVaultKeyReference
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/models/key_vault_key_reference.rb
Overview
Describes a reference to Key Vault Key
Instance Attribute Summary collapse
-
#key_url ⇒ String
Gets or sets the URL referencing a key in a Key Vault.
-
#source_vault ⇒ SubResource
containing the key.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ KeyVaultKeyReference
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
#key_url ⇒ String
Returns Gets or sets the URL referencing a key in a Key Vault.
16 17 18 |
# File 'lib/azure_mgmt_compute/models/key_vault_key_reference.rb', line 16 def key_url @key_url end |
#source_vault ⇒ SubResource
containing the key
20 21 22 |
# File 'lib/azure_mgmt_compute/models/key_vault_key_reference.rb', line 20 def source_vault @source_vault end |
Class Method Details
.deserialize_object(object) ⇒ KeyVaultKeyReference
Deserializes given Ruby Hash into Model object.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/azure_mgmt_compute/models/key_vault_key_reference.rb', line 57 def self.deserialize_object(object) return if object.nil? output_object = KeyVaultKeyReference.new deserialized_property = object['keyUrl'] output_object.key_url = deserialized_property deserialized_property = object['sourceVault'] unless deserialized_property.nil? deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property) end output_object.source_vault = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/azure_mgmt_compute/models/key_vault_key_reference.rb', line 36 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.key_url output_object['keyUrl'] = serialized_property unless serialized_property.nil? serialized_property = object.source_vault unless serialized_property.nil? serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property) end output_object['sourceVault'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
25 26 27 28 29 |
# File 'lib/azure_mgmt_compute/models/key_vault_key_reference.rb', line 25 def validate fail MsRest::ValidationError, 'property key_url is nil' if @key_url.nil? fail MsRest::ValidationError, 'property source_vault is nil' if @source_vault.nil? @source_vault.validate unless @source_vault.nil? end |