# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0 # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ARM::Web module Models # # Model object. # class CsrProperties include MsRestAzure # @return [String] Name used to locate CSR object attr_accessor :name # @return [String] Distinguished name of certificate to be created attr_accessor :distinguished_name # @return [String] Actual CSR string created attr_accessor :csr_string # @return [String] PFX certifcate of created certificate attr_accessor :pfx_blob # @return [String] PFX password attr_accessor :password # @return [String] Hash of the certificates public key attr_accessor :public_key_hash # @return [String] Hosting environment attr_accessor :hosting_environment # # Validate the object. Throws ValidationError if validation fails. # def validate # Nothing to validate end # # Serializes given Model object into Ruby Hash. # @param object Model object to serialize. # @return [Hash] Serialized object in form of Ruby Hash. # def self.serialize_object(object) object.validate output_object = {} serialized_property = object.name output_object['name'] = serialized_property unless serialized_property.nil? serialized_property = object.distinguished_name output_object['distinguishedName'] = serialized_property unless serialized_property.nil? serialized_property = object.csr_string output_object['csrString'] = serialized_property unless serialized_property.nil? serialized_property = object.pfx_blob output_object['pfxBlob'] = serialized_property unless serialized_property.nil? serialized_property = object.password output_object['password'] = serialized_property unless serialized_property.nil? serialized_property = object.public_key_hash output_object['publicKeyHash'] = serialized_property unless serialized_property.nil? serialized_property = object.hosting_environment output_object['hostingEnvironment'] = serialized_property unless serialized_property.nil? output_object end # # Deserializes given Ruby Hash into Model object. # @param object [Hash] Ruby Hash object to deserialize. # @return [CsrProperties] Deserialized object. # def self.deserialize_object(object) return if object.nil? output_object = CsrProperties.new deserialized_property = object['name'] output_object.name = deserialized_property deserialized_property = object['distinguishedName'] output_object.distinguished_name = deserialized_property deserialized_property = object['csrString'] output_object.csr_string = deserialized_property deserialized_property = object['pfxBlob'] output_object.pfx_blob = deserialized_property deserialized_property = object['password'] output_object.password = deserialized_property deserialized_property = object['publicKeyHash'] output_object.public_key_hash = deserialized_property deserialized_property = object['hostingEnvironment'] output_object.hosting_environment = deserialized_property output_object end end end end