Class: Azure::ARM::Compute::Models::VaultSecretGroup

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_compute/models/vault_secret_group.rb

Overview

Describes a set of certificates which are all in the same Key Vault.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#source_vaultSubResource

containing all of the certificates in VaultCertificates.

Returns:

  • (SubResource)

    Gets or sets the Relative URL of the Key Vault



17
18
19
# File 'lib/azure_mgmt_compute/models/vault_secret_group.rb', line 17

def source_vault
  @source_vault
end

#vault_certificatesArray<VaultCertificate>

references in SourceVault which contain certificates

Returns:



21
22
23
# File 'lib/azure_mgmt_compute/models/vault_secret_group.rb', line 21

def vault_certificates
  @vault_certificates
end

Class Method Details

.deserialize_object(object) ⇒ VaultSecretGroup

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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
# File 'lib/azure_mgmt_compute/models/vault_secret_group.rb', line 67

def self.deserialize_object(object)
  return if object.nil?
  output_object = VaultSecretGroup.new

  deserialized_property = object['sourceVault']
  unless deserialized_property.nil?
    deserialized_property = SubResource.deserialize_object(deserialized_property)
  end
  output_object.source_vault = deserialized_property

  deserialized_property = object['vaultCertificates']
  unless deserialized_property.nil?
    deserializedArray = [];
    deserialized_property.each do |element1|
      unless element1.nil?
        element1 = VaultCertificate.deserialize_object(element1)
      end
      deserializedArray.push(element1);
    end
    deserialized_property = deserializedArray;
  end
  output_object.vault_certificates = deserialized_property

  output_object.validate

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/azure_mgmt_compute/models/vault_secret_group.rb', line 36

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.source_vault
  unless serialized_property.nil?
    serialized_property = SubResource.serialize_object(serialized_property)
  end
  output_object['sourceVault'] = serialized_property unless serialized_property.nil?

  serialized_property = object.vault_certificates
  unless serialized_property.nil?
    serializedArray = []
    serialized_property.each do |element|
      unless element.nil?
        element = VaultCertificate.serialize_object(element)
      end
      serializedArray.push(element)
    end
    serialized_property = serializedArray
  end
  output_object['vaultCertificates'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



26
27
28
29
# File 'lib/azure_mgmt_compute/models/vault_secret_group.rb', line 26

def validate
  @source_vault.validate unless @source_vault.nil?
  @vault_certificates.each{ |e| e.validate if e.respond_to?(:validate) } unless @vault_certificates.nil?
end