Class: Azure::ARM::Compute::Models::LinuxConfiguration

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

Overview

Describes Windows Configuration of the OS Profile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#disable_password_authenticationBoolean

and password is allowed or not

Returns:

  • (Boolean)

    Gets or sets whether Authentication using user name



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

def disable_password_authentication
  @disable_password_authentication
end

#sshSshConfiguration

linux VMs

Returns:



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

def ssh
  @ssh
end

Class Method Details

.deserialize_object(object) ⇒ LinuxConfiguration

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/azure_mgmt_compute/models/linux_configuration.rb', line 56

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

  deserialized_property = object['disablePasswordAuthentication']
  output_object.disable_password_authentication = deserialized_property

  deserialized_property = object['ssh']
  unless deserialized_property.nil?
    deserialized_property = SshConfiguration.deserialize_object(deserialized_property)
  end
  output_object.ssh = 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.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/azure_mgmt_compute/models/linux_configuration.rb', line 35

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

  serialized_property = object.disable_password_authentication
  output_object['disablePasswordAuthentication'] = serialized_property unless serialized_property.nil?

  serialized_property = object.ssh
  unless serialized_property.nil?
    serialized_property = SshConfiguration.serialize_object(serialized_property)
  end
  output_object['ssh'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



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

def validate
  @ssh.validate unless @ssh.nil?
end