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.



3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
# File 'lib/ovirtsdk4/types.rb', line 3772

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.



3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
# File 'lib/ovirtsdk4/types.rb', line 3787

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)


3567
3568
3569
# File 'lib/ovirtsdk4/types.rb', line 3567

def clone
  @clone
end

#clone=(value) ⇒ Object

Sets the value of the clone attribute.

Parameters:

  • value (Boolean)


3576
3577
3578
# File 'lib/ovirtsdk4/types.rb', line 3576

def clone=(value)
  @clone = value
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:



3585
3586
3587
# File 'lib/ovirtsdk4/types.rb', line 3585

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:



3598
3599
3600
3601
3602
3603
# File 'lib/ovirtsdk4/types.rb', line 3598

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:



3610
3611
3612
# File 'lib/ovirtsdk4/types.rb', line 3610

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:



3623
3624
3625
3626
3627
3628
# File 'lib/ovirtsdk4/types.rb', line 3623

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.



3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
# File 'lib/ovirtsdk4/types.rb', line 3802

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:



3635
3636
3637
# File 'lib/ovirtsdk4/types.rb', line 3635

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)


3648
3649
3650
3651
3652
3653
# File 'lib/ovirtsdk4/types.rb', line 3648

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:



3660
3661
3662
# File 'lib/ovirtsdk4/types.rb', line 3660

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:



3673
3674
3675
3676
3677
3678
# File 'lib/ovirtsdk4/types.rb', line 3673

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:



3685
3686
3687
# File 'lib/ovirtsdk4/types.rb', line 3685

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:



3698
3699
3700
3701
3702
3703
# File 'lib/ovirtsdk4/types.rb', line 3698

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:



3710
3711
3712
# File 'lib/ovirtsdk4/types.rb', line 3710

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:



3723
3724
3725
3726
3727
3728
# File 'lib/ovirtsdk4/types.rb', line 3723

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)


3735
3736
3737
# File 'lib/ovirtsdk4/types.rb', line 3735

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


3744
3745
3746
# File 'lib/ovirtsdk4/types.rb', line 3744

def url=(value)
  @url = value
end