Creates a new instance of the {CloudInit} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [Array<AuthorizedKey>, Array<Hash>] :authorized_keys The values of attribute `authorized_keys`.
@option opts [Array<File>, Array<Hash>] :files The values of attribute `files`.
@option opts [Host, Hash] :host The value of attribute `host`.
@option opts [NetworkConfiguration, Hash] :network_configuration The value of attribute `network_configuration`.
@option opts [Boolean] :regenerate_ssh_keys The value of attribute `regenerate_ssh_keys`.
@option opts [String] :timezone The value of attribute `timezone`.
@option opts [Array<User>, Array<Hash>] :users The values of attribute `users`.
# File lib/ovirtsdk4/types.rb, line 1814 def initialize(opts = {}) super(opts) self.authorized_keys = opts[:authorized_keys] self.files = opts[:files] self.host = opts[:host] self.network_configuration = opts[:network_configuration] self.regenerate_ssh_keys = opts[:regenerate_ssh_keys] self.timezone = opts[:timezone] self.users = opts[:users] end
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 1828 def ==(other) super && @authorized_keys == other.authorized_keys && @files == other.files && @host == other.host && @network_configuration == other.network_configuration && @regenerate_ssh_keys == other.regenerate_ssh_keys && @timezone == other.timezone && @users == other.users end
Returns the value of the `files` attribute.
@return [Array<File>]
# File lib/ovirtsdk4/types.rb, line 1659 def files @files end
Sets the value of the `files` attribute.
@param list [Array<File>]
# File lib/ovirtsdk4/types.rb, line 1668 def files=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = File.new(value) end end end @files = list end
Generates a hash value for this object.
# File lib/ovirtsdk4/types.rb, line 1842 def hash super + @authorized_keys.hash + @files.hash + @host.hash + @network_configuration.hash + @regenerate_ssh_keys.hash + @timezone.hash + @users.hash end
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 1685 def host @host end
Sets the value of the `host` attribute.
@param value [Host, Hash]
The `value` parameter can be an instance of {OvirtSDK4::Host} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.
# File lib/ovirtsdk4/types.rb, line 1698 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end
Returns the value of the `network_configuration` attribute.
@return [NetworkConfiguration]
# File lib/ovirtsdk4/types.rb, line 1710 def network_configuration @network_configuration end
Sets the value of the `network_configuration` attribute.
@param value [NetworkConfiguration, Hash]
The `value` parameter can be an instance of {OvirtSDK4::NetworkConfiguration} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.
# File lib/ovirtsdk4/types.rb, line 1723 def network_configuration=(value) if value.is_a?(Hash) value = NetworkConfiguration.new(value) end @network_configuration = value end
Returns the value of the `regenerate_ssh_keys` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 1735 def regenerate_ssh_keys @regenerate_ssh_keys end
Sets the value of the `regenerate_ssh_keys` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 1744 def regenerate_ssh_keys=(value) @regenerate_ssh_keys = value end
Returns the value of the `timezone` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 1753 def timezone @timezone end
Sets the value of the `timezone` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 1762 def timezone=(value) @timezone = value end
Returns the value of the `users` attribute.
@return [Array<User>]
# File lib/ovirtsdk4/types.rb, line 1771 def users @users end
Sets the value of the `users` attribute.
@param list [Array<User>]
# File lib/ovirtsdk4/types.rb, line 1780 def users=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = User.new(value) end end end @users = list end