Class: OvirtSDK4::GlusterClient

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

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

  • :bytes_read (Integer)

    The value of attribute bytes_read.

  • :bytes_written (Integer)

    The value of attribute bytes_written.

  • :client_port (Integer)

    The value of attribute client_port.

  • :host_name (String)

    The value of attribute host_name.



4242
4243
4244
4245
4246
4247
4248
# File 'lib/ovirtsdk4/types.rb', line 4242

def initialize(opts = {})
  super(opts)
  self.bytes_read = opts[:bytes_read]
  self.bytes_written = opts[:bytes_written]
  self.client_port = opts[:client_port]
  self.host_name = opts[:host_name]
end

Instance Method Details

#==(other) ⇒ Object

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



4253
4254
4255
4256
4257
4258
4259
# File 'lib/ovirtsdk4/types.rb', line 4253

def ==(other)
  super &&
  @bytes_read == other.bytes_read &&
  @bytes_written == other.bytes_written &&
  @client_port == other.client_port &&
  @host_name == other.host_name
end

#bytes_readInteger

Returns the value of the bytes_read attribute.

Returns:

  • (Integer)


4159
4160
4161
# File 'lib/ovirtsdk4/types.rb', line 4159

def bytes_read
  @bytes_read
end

#bytes_read=(value) ⇒ Object

Sets the value of the bytes_read attribute.

Parameters:

  • value (Integer)


4168
4169
4170
# File 'lib/ovirtsdk4/types.rb', line 4168

def bytes_read=(value)
  @bytes_read = value
end

#bytes_writtenInteger

Returns the value of the bytes_written attribute.

Returns:

  • (Integer)


4177
4178
4179
# File 'lib/ovirtsdk4/types.rb', line 4177

def bytes_written
  @bytes_written
end

#bytes_written=(value) ⇒ Object

Sets the value of the bytes_written attribute.

Parameters:

  • value (Integer)


4186
4187
4188
# File 'lib/ovirtsdk4/types.rb', line 4186

def bytes_written=(value)
  @bytes_written = value
end

#client_portInteger

Returns the value of the client_port attribute.

Returns:

  • (Integer)


4195
4196
4197
# File 'lib/ovirtsdk4/types.rb', line 4195

def client_port
  @client_port
end

#client_port=(value) ⇒ Object

Sets the value of the client_port attribute.

Parameters:

  • value (Integer)


4204
4205
4206
# File 'lib/ovirtsdk4/types.rb', line 4204

def client_port=(value)
  @client_port = value
end

#hashObject

Generates a hash value for this object.



4264
4265
4266
4267
4268
4269
4270
# File 'lib/ovirtsdk4/types.rb', line 4264

def hash
  super +
  @bytes_read.hash +
  @bytes_written.hash +
  @client_port.hash +
  @host_name.hash
end

#host_nameString

Returns the value of the host_name attribute.

Returns:

  • (String)


4213
4214
4215
# File 'lib/ovirtsdk4/types.rb', line 4213

def host_name
  @host_name
end

#host_name=(value) ⇒ Object

Sets the value of the host_name attribute.

Parameters:

  • value (String)


4222
4223
4224
# File 'lib/ovirtsdk4/types.rb', line 4222

def host_name=(value)
  @host_name = value
end