Class: OvirtSDK4::GlusterHook

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 = {}) ⇒ GlusterHook

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

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :conflict_status (Integer)

    The value of attribute conflict_status.

  • :conflicts (String)

    The value of attribute conflicts.

  • :content (String)

    The value of attribute content.

  • :content_type (HookContentType)

    The value of attribute content_type.

  • :description (String)

    The value of attribute description.

  • :gluster_command (String)

    The value of attribute gluster_command.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :server_hooks (Array<GlusterServerHook>, Array<Hash>)

    The values of attribute server_hooks.

  • :stage (HookStage)

    The value of attribute stage.

  • :status (GlusterHookStatus)

    The value of attribute status.


40572
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
# File 'lib/ovirtsdk4/types.rb', line 40572

def initialize(opts = {})
  super(opts)
  self.checksum = opts[:checksum]
  self.cluster = opts[:cluster]
  self.conflict_status = opts[:conflict_status]
  self.conflicts = opts[:conflicts]
  self.content = opts[:content]
  self.content_type = opts[:content_type]
  self.gluster_command = opts[:gluster_command]
  self.server_hooks = opts[:server_hooks]
  self.stage = opts[:stage]
  self.status = opts[:status]
end

Instance Method Details

#==(other) ⇒ Object

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


40589
40590
40591
40592
40593
40594
40595
40596
40597
40598
40599
40600
40601
# File 'lib/ovirtsdk4/types.rb', line 40589

def ==(other)
  super &&
  @checksum == other.checksum &&
  @cluster == other.cluster &&
  @conflict_status == other.conflict_status &&
  @conflicts == other.conflicts &&
  @content == other.content &&
  @content_type == other.content_type &&
  @gluster_command == other.gluster_command &&
  @server_hooks == other.server_hooks &&
  @stage == other.stage &&
  @status == other.status
end

#checksumString

Returns the value of the checksum attribute.

Returns:

  • (String)

40274
40275
40276
# File 'lib/ovirtsdk4/types.rb', line 40274

def checksum
  @checksum
end

#checksum=(value) ⇒ Object

Sets the value of the checksum attribute.

Parameters:

  • value (String)

40283
40284
40285
# File 'lib/ovirtsdk4/types.rb', line 40283

def checksum=(value)
  @checksum = value
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:


40292
40293
40294
# File 'lib/ovirtsdk4/types.rb', line 40292

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:


40305
40306
40307
40308
40309
40310
# File 'lib/ovirtsdk4/types.rb', line 40305

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

40317
40318
40319
# File 'lib/ovirtsdk4/types.rb', line 40317

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

40326
40327
40328
# File 'lib/ovirtsdk4/types.rb', line 40326

def comment=(value)
  @comment = value
end

#conflict_statusInteger

Returns the value of the conflict_status attribute.

Returns:

  • (Integer)

40335
40336
40337
# File 'lib/ovirtsdk4/types.rb', line 40335

def conflict_status
  @conflict_status
end

#conflict_status=(value) ⇒ Object

Sets the value of the conflict_status attribute.

Parameters:

  • value (Integer)

40344
40345
40346
# File 'lib/ovirtsdk4/types.rb', line 40344

def conflict_status=(value)
  @conflict_status = value
end

#conflictsString

Returns the value of the conflicts attribute.

Returns:

  • (String)

40353
40354
40355
# File 'lib/ovirtsdk4/types.rb', line 40353

def conflicts
  @conflicts
end

#conflicts=(value) ⇒ Object

Sets the value of the conflicts attribute.

Parameters:

  • value (String)

40362
40363
40364
# File 'lib/ovirtsdk4/types.rb', line 40362

def conflicts=(value)
  @conflicts = value
end

#contentString

Returns the value of the content attribute.

Returns:

  • (String)

40371
40372
40373
# File 'lib/ovirtsdk4/types.rb', line 40371

def content
  @content
end

#content=(value) ⇒ Object

Sets the value of the content attribute.

Parameters:

  • value (String)

40380
40381
40382
# File 'lib/ovirtsdk4/types.rb', line 40380

def content=(value)
  @content = value
end

#content_typeHookContentType

Returns the value of the content_type attribute.

Returns:


40389
40390
40391
# File 'lib/ovirtsdk4/types.rb', line 40389

def content_type
  @content_type
end

#content_type=(value) ⇒ Object

Sets the value of the content_type attribute.

Parameters:


40398
40399
40400
# File 'lib/ovirtsdk4/types.rb', line 40398

def content_type=(value)
  @content_type = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

40407
40408
40409
# File 'lib/ovirtsdk4/types.rb', line 40407

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

40416
40417
40418
# File 'lib/ovirtsdk4/types.rb', line 40416

def description=(value)
  @description = value
end

#gluster_commandString

Returns the value of the gluster_command attribute.

Returns:

  • (String)

40425
40426
40427
# File 'lib/ovirtsdk4/types.rb', line 40425

def gluster_command
  @gluster_command
end

#gluster_command=(value) ⇒ Object

Sets the value of the gluster_command attribute.

Parameters:

  • value (String)

40434
40435
40436
# File 'lib/ovirtsdk4/types.rb', line 40434

def gluster_command=(value)
  @gluster_command = value
end

#hashObject

Generates a hash value for this object.


40606
40607
40608
40609
40610
40611
40612
40613
40614
40615
40616
40617
40618
# File 'lib/ovirtsdk4/types.rb', line 40606

def hash
  super +
  @checksum.hash +
  @cluster.hash +
  @conflict_status.hash +
  @conflicts.hash +
  @content.hash +
  @content_type.hash +
  @gluster_command.hash +
  @server_hooks.hash +
  @stage.hash +
  @status.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

40443
40444
40445
# File 'lib/ovirtsdk4/types.rb', line 40443

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

40452
40453
40454
# File 'lib/ovirtsdk4/types.rb', line 40452

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

40461
40462
40463
# File 'lib/ovirtsdk4/types.rb', line 40461

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

40470
40471
40472
# File 'lib/ovirtsdk4/types.rb', line 40470

def name=(value)
  @name = value
end

#server_hooksArray<GlusterServerHook>

Returns the value of the server_hooks attribute.

Returns:


40479
40480
40481
# File 'lib/ovirtsdk4/types.rb', line 40479

def server_hooks
  @server_hooks
end

#server_hooks=(list) ⇒ Object

Sets the value of the server_hooks attribute.

Parameters:


40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
# File 'lib/ovirtsdk4/types.rb', line 40488

def server_hooks=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = GlusterServerHook.new(value)
      end
    end
  end
  @server_hooks = list
end

#stageHookStage

Returns the value of the stage attribute.

Returns:


40505
40506
40507
# File 'lib/ovirtsdk4/types.rb', line 40505

def stage
  @stage
end

#stage=(value) ⇒ Object

Sets the value of the stage attribute.

Parameters:


40514
40515
40516
# File 'lib/ovirtsdk4/types.rb', line 40514

def stage=(value)
  @stage = value
end

#statusGlusterHookStatus

Returns the value of the status attribute.

Returns:


40523
40524
40525
# File 'lib/ovirtsdk4/types.rb', line 40523

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:


40532
40533
40534
# File 'lib/ovirtsdk4/types.rb', line 40532

def status=(value)
  @status = value
end