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 1454 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 the value of the `files` attribute.
@return [Array<File>]
# File lib/ovirtsdk4/types.rb, line 1301 def files return @files end
Sets the value of the `files` attribute.
@param list [Array<File>]
# File lib/ovirtsdk4/types.rb, line 1309 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
Returns the value of the `host` attribute.
@return [Host]
# File lib/ovirtsdk4/types.rb, line 1326 def host return @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 1339 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 1351 def network_configuration return @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 1364 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 1376 def regenerate_ssh_keys return @regenerate_ssh_keys end
Sets the value of the `regenerate_ssh_keys` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 1385 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 1394 def timezone return @timezone end
Sets the value of the `timezone` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 1403 def timezone=(value) @timezone = value end
Returns the value of the `users` attribute.
@return [Array<User>]
# File lib/ovirtsdk4/types.rb, line 1412 def users return @users end
Sets the value of the `users` attribute.
@param list [Array<User>]
# File lib/ovirtsdk4/types.rb, line 1420 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