Class: OvirtSDK4::ExternalTemplateImport

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ ExternalTemplateImport

Creates a new instance of the OvirtSDK4::ExternalTemplateImport class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :clone (Boolean)

    The value of attribute clone.

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :cpu_profile (CpuProfile, Hash)

    The value of attribute cpu_profile.

  • :host (Host, Hash)

    The value of attribute host.

  • :quota (Quota, Hash)

    The value of attribute quota.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.

  • :template (Template, Hash)

    The value of attribute template.

  • :url (String)

    The value of attribute url.



3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
# File 'lib/ovirtsdk4/types.rb', line 3996

def initialize(opts = {})
  super(opts)
  self.clone = opts[:clone]
  self.cluster = opts[:cluster]
  self.cpu_profile = opts[:cpu_profile]
  self.host = opts[:host]
  self.quota = opts[:quota]
  self.storage_domain = opts[:storage_domain]
  self.template = opts[:template]
  self.url = opts[:url]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
# File 'lib/ovirtsdk4/types.rb', line 4011

def ==(other)
  super &&
  @clone == other.clone &&
  @cluster == other.cluster &&
  @cpu_profile == other.cpu_profile &&
  @host == other.host &&
  @quota == other.quota &&
  @storage_domain == other.storage_domain &&
  @template == other.template &&
  @url == other.url
end

#cloneBoolean

Returns the value of the clone attribute.

Returns:

  • (Boolean)


3791
3792
3793
# File 'lib/ovirtsdk4/types.rb', line 3791

def clone
  @clone
end

#clone=(value) ⇒ Object

Sets the value of the clone attribute.

Parameters:

  • value (Boolean)


3800
3801
3802
# File 'lib/ovirtsdk4/types.rb', line 3800

def clone=(value)
  @clone = value
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:



3809
3810
3811
# File 'lib/ovirtsdk4/types.rb', line 3809

def cluster
  @cluster
end

#cluster=(value) ⇒ Object

Sets the value of the cluster attribute.

The value parameter can be an instance of Cluster 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.

Parameters:



3822
3823
3824
3825
3826
3827
# File 'lib/ovirtsdk4/types.rb', line 3822

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

#cpu_profileCpuProfile

Returns the value of the cpu_profile attribute.

Returns:



3834
3835
3836
# File 'lib/ovirtsdk4/types.rb', line 3834

def cpu_profile
  @cpu_profile
end

#cpu_profile=(value) ⇒ Object

Sets the value of the cpu_profile attribute.

The value parameter can be an instance of CpuProfile 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.

Parameters:



3847
3848
3849
3850
3851
3852
# File 'lib/ovirtsdk4/types.rb', line 3847

def cpu_profile=(value)
  if value.is_a?(Hash)
    value = CpuProfile.new(value)
  end
  @cpu_profile = value
end

#hashObject

Generates a hash value for this object.



4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
# File 'lib/ovirtsdk4/types.rb', line 4026

def hash
  super +
  @clone.hash +
  @cluster.hash +
  @cpu_profile.hash +
  @host.hash +
  @quota.hash +
  @storage_domain.hash +
  @template.hash +
  @url.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



3859
3860
3861
# File 'lib/ovirtsdk4/types.rb', line 3859

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

The value parameter can be an instance of 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.

Parameters:

  • value (Host, Hash)


3872
3873
3874
3875
3876
3877
# File 'lib/ovirtsdk4/types.rb', line 3872

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:



3884
3885
3886
# File 'lib/ovirtsdk4/types.rb', line 3884

def quota
  @quota
end

#quota=(value) ⇒ Object

Sets the value of the quota attribute.

The value parameter can be an instance of Quota 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.

Parameters:



3897
3898
3899
3900
3901
3902
# File 'lib/ovirtsdk4/types.rb', line 3897

def quota=(value)
  if value.is_a?(Hash)
    value = Quota.new(value)
  end
  @quota = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



3909
3910
3911
# File 'lib/ovirtsdk4/types.rb', line 3909

def storage_domain
  @storage_domain
end

#storage_domain=(value) ⇒ Object

Sets the value of the storage_domain attribute.

The value parameter can be an instance of StorageDomain 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.

Parameters:



3922
3923
3924
3925
3926
3927
# File 'lib/ovirtsdk4/types.rb', line 3922

def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end

#templateTemplate

Returns the value of the template attribute.

Returns:



3934
3935
3936
# File 'lib/ovirtsdk4/types.rb', line 3934

def template
  @template
end

#template=(value) ⇒ Object

Sets the value of the template attribute.

The value parameter can be an instance of Template 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.

Parameters:



3947
3948
3949
3950
3951
3952
# File 'lib/ovirtsdk4/types.rb', line 3947

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


3959
3960
3961
# File 'lib/ovirtsdk4/types.rb', line 3959

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


3968
3969
3970
# File 'lib/ovirtsdk4/types.rb', line 3968

def url=(value)
  @url = value
end