class OvirtSDK4::CloudInit
Public Class Methods
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`.
OvirtSDK4::Struct::new
# File lib/ovirtsdk4/types.rb, line 1966 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
Public Instance Methods
Returns `true` if `self` and `other` have the same attributes and values.
# File lib/ovirtsdk4/types.rb, line 1980 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 1811 def files @files end
Sets the value of the `files` attribute.
@param list [Array<File>]
# File lib/ovirtsdk4/types.rb, line 1820 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.
OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 1994 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 1837 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 1850 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 1862 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 1875 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 1887 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 1896 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 1905 def timezone @timezone end
Sets the value of the `timezone` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 1914 def timezone=(value) @timezone = value end
Returns the value of the `users` attribute.
@return [Array<User>]
# File lib/ovirtsdk4/types.rb, line 1923 def users @users end
Sets the value of the `users` attribute.
@param list [Array<User>]
# File lib/ovirtsdk4/types.rb, line 1932 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