Class: OvirtSDK4::GlusterServerHook

Inherits:
Identified 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 = {}) ⇒ GlusterServerHook

Creates a new instance of the OvirtSDK4::GlusterServerHook 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):

  • :checksum (String)

    The value of attribute checksum.

  • :comment (String)

    The value of attribute comment.

  • :content_type (HookContentType)

    The value of attribute content_type.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :status (GlusterHookStatus)

    The value of attribute status.



39477
39478
39479
39480
39481
39482
39483
# File 'lib/ovirtsdk4/types.rb', line 39477

def initialize(opts = {})
  super(opts)
  self.checksum = opts[:checksum]
  self.content_type = opts[:content_type]
  self.host = opts[:host]
  self.status = opts[:status]
end

Instance Method Details

#==(other) ⇒ Object

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



39488
39489
39490
39491
39492
39493
39494
# File 'lib/ovirtsdk4/types.rb', line 39488

def ==(other)
  super &&
  @checksum == other.checksum &&
  @content_type == other.content_type &&
  @host == other.host &&
  @status == other.status
end

#checksumString

Returns the value of the checksum attribute.

Returns:

  • (String)


39307
39308
39309
# File 'lib/ovirtsdk4/types.rb', line 39307

def checksum
  @checksum
end

#checksum=(value) ⇒ Object

Sets the value of the checksum attribute.

Parameters:

  • value (String)


39316
39317
39318
# File 'lib/ovirtsdk4/types.rb', line 39316

def checksum=(value)
  @checksum = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


39325
39326
39327
# File 'lib/ovirtsdk4/types.rb', line 39325

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


39334
39335
39336
# File 'lib/ovirtsdk4/types.rb', line 39334

def comment=(value)
  @comment = value
end

#content_typeHookContentType

Returns the value of the content_type attribute.

Returns:



39343
39344
39345
# File 'lib/ovirtsdk4/types.rb', line 39343

def content_type
  @content_type
end

#content_type=(value) ⇒ Object

Sets the value of the content_type attribute.

Parameters:



39352
39353
39354
# File 'lib/ovirtsdk4/types.rb', line 39352

def content_type=(value)
  @content_type = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


39361
39362
39363
# File 'lib/ovirtsdk4/types.rb', line 39361

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


39370
39371
39372
# File 'lib/ovirtsdk4/types.rb', line 39370

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



39499
39500
39501
39502
39503
39504
39505
# File 'lib/ovirtsdk4/types.rb', line 39499

def hash
  super +
  @checksum.hash +
  @content_type.hash +
  @host.hash +
  @status.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



39379
39380
39381
# File 'lib/ovirtsdk4/types.rb', line 39379

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)


39392
39393
39394
39395
39396
39397
# File 'lib/ovirtsdk4/types.rb', line 39392

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)


39404
39405
39406
# File 'lib/ovirtsdk4/types.rb', line 39404

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


39413
39414
39415
# File 'lib/ovirtsdk4/types.rb', line 39413

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


39422
39423
39424
# File 'lib/ovirtsdk4/types.rb', line 39422

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


39431
39432
39433
# File 'lib/ovirtsdk4/types.rb', line 39431

def name=(value)
  @name = value
end

#statusGlusterHookStatus

Returns the value of the status attribute.

Returns:



39440
39441
39442
# File 'lib/ovirtsdk4/types.rb', line 39440

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



39449
39450
39451
# File 'lib/ovirtsdk4/types.rb', line 39449

def status=(value)
  @status = value
end