Class: OCI::Mysql::Models::DbSystemStatusResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/mysql/models/db_system_status_result.rb

Overview

The status collected from the DB System.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DbSystemStatusResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 105

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.can_accept_client_connections = attributes[:'canAcceptClientConnections'] unless attributes[:'canAcceptClientConnections'].nil?

  raise 'You cannot provide both :canAcceptClientConnections and :can_accept_client_connections' if attributes.key?(:'canAcceptClientConnections') && attributes.key?(:'can_accept_client_connections')

  self.can_accept_client_connections = attributes[:'can_accept_client_connections'] unless attributes[:'can_accept_client_connections'].nil?

  self.is_in_offline_mode = attributes[:'isInOfflineMode'] unless attributes[:'isInOfflineMode'].nil?

  raise 'You cannot provide both :isInOfflineMode and :is_in_offline_mode' if attributes.key?(:'isInOfflineMode') && attributes.key?(:'is_in_offline_mode')

  self.is_in_offline_mode = attributes[:'is_in_offline_mode'] unless attributes[:'is_in_offline_mode'].nil?

  self.is_writable = attributes[:'isWritable'] unless attributes[:'isWritable'].nil?

  raise 'You cannot provide both :isWritable and :is_writable' if attributes.key?(:'isWritable') && attributes.key?(:'is_writable')

  self.is_writable = attributes[:'is_writable'] unless attributes[:'is_writable'].nil?

  self.are_all_mysql_instances_healthy = attributes[:'areAllMysqlInstancesHealthy'] unless attributes[:'areAllMysqlInstancesHealthy'].nil?

  raise 'You cannot provide both :areAllMysqlInstancesHealthy and :are_all_mysql_instances_healthy' if attributes.key?(:'areAllMysqlInstancesHealthy') && attributes.key?(:'are_all_mysql_instances_healthy')

  self.are_all_mysql_instances_healthy = attributes[:'are_all_mysql_instances_healthy'] unless attributes[:'are_all_mysql_instances_healthy'].nil?

  self.is_storage_full = attributes[:'isStorageFull'] unless attributes[:'isStorageFull'].nil?

  raise 'You cannot provide both :isStorageFull and :is_storage_full' if attributes.key?(:'isStorageFull') && attributes.key?(:'is_storage_full')

  self.is_storage_full = attributes[:'is_storage_full'] unless attributes[:'is_storage_full'].nil?

  self.gtid_set = attributes[:'gtidSet'] if attributes[:'gtidSet']

  raise 'You cannot provide both :gtidSet and :gtid_set' if attributes.key?(:'gtidSet') && attributes.key?(:'gtid_set')

  self.gtid_set = attributes[:'gtid_set'] if attributes[:'gtid_set']

  self.is_gtid_set_applied = attributes[:'isGtidSetApplied'] unless attributes[:'isGtidSetApplied'].nil?

  raise 'You cannot provide both :isGtidSetApplied and :is_gtid_set_applied' if attributes.key?(:'isGtidSetApplied') && attributes.key?(:'is_gtid_set_applied')

  self.is_gtid_set_applied = attributes[:'is_gtid_set_applied'] unless attributes[:'is_gtid_set_applied'].nil?

  self.channels_status = attributes[:'channelsStatus'] if attributes[:'channelsStatus']

  raise 'You cannot provide both :channelsStatus and :channels_status' if attributes.key?(:'channelsStatus') && attributes.key?(:'channels_status')

  self.channels_status = attributes[:'channels_status'] if attributes[:'channels_status']
end

Instance Attribute Details

#are_all_mysql_instances_healthyBOOLEAN

Specifies if the single MySQL instance in a standalone DB System or all MySQL instances in a highly available DB System (excluding read replicas) are healthy.

Returns:

  • (BOOLEAN)


34
35
36
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 34

def are_all_mysql_instances_healthy
  @are_all_mysql_instances_healthy
end

#can_accept_client_connectionsBOOLEAN

Specifies if the Read/Write endpoint of the DB System can accept client connections.

Returns:

  • (BOOLEAN)


15
16
17
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 15

def can_accept_client_connections
  @can_accept_client_connections
end

#channels_statusArray<OCI::Mysql::Models::ChannelStatusResult>

A list showing the status of the channels attached to the DB System for the requested channel IDs.



57
58
59
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 57

def channels_status
  @channels_status
end

#gtid_setString

The GTID set on the DB System (either GTID_EXECUTED or GTID_AVAILABLE) as specified by the gtidSetType parameter in the request.

Returns:

  • (String)


46
47
48
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 46

def gtid_set
  @gtid_set
end

#is_gtid_set_appliedBOOLEAN

Specifies if the GTID set in the gtidSetToApply parameter (if provided in the request) is fully applied on the DB System. If gtidSetToApply is not provided in the request or is "", this field will be empty.

Returns:

  • (BOOLEAN)


52
53
54
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 52

def is_gtid_set_applied
  @is_gtid_set_applied
end

#is_in_offline_modeBOOLEAN

Specifies if the DB System is in offline mode based on the value of the MySQL system variable offline_mode. If True, access is allowed only to users with specific privileges. If False, access is allowed for all MySQL user accounts.

Returns:

  • (BOOLEAN)


23
24
25
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 23

def is_in_offline_mode
  @is_in_offline_mode
end

#is_storage_fullBOOLEAN

Specifies if there is any MySQL instance (excluding read replicas) whose storage capacity is below [storage reserve] (docs.oracle.com/en-us/iaas/mysql-database/doc/health-monitor.html#GUID-C6CE25C7-B728-4C80-B548-A76B42005C83.html).

Returns:

  • (BOOLEAN)


40
41
42
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 40

def is_storage_full
  @is_storage_full
end

#is_writableBOOLEAN

Specifies if connected users can run write queries on the DB System.

Returns:

  • (BOOLEAN)


28
29
30
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 28

def is_writable
  @is_writable
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 60

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'can_accept_client_connections': :'canAcceptClientConnections',
    'is_in_offline_mode': :'isInOfflineMode',
    'is_writable': :'isWritable',
    'are_all_mysql_instances_healthy': :'areAllMysqlInstancesHealthy',
    'is_storage_full': :'isStorageFull',
    'gtid_set': :'gtidSet',
    'is_gtid_set_applied': :'isGtidSetApplied',
    'channels_status': :'channelsStatus'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 76

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'can_accept_client_connections': :'BOOLEAN',
    'is_in_offline_mode': :'BOOLEAN',
    'is_writable': :'BOOLEAN',
    'are_all_mysql_instances_healthy': :'BOOLEAN',
    'is_storage_full': :'BOOLEAN',
    'gtid_set': :'String',
    'is_gtid_set_applied': :'BOOLEAN',
    'channels_status': :'Array<OCI::Mysql::Models::ChannelStatusResult>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 167

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    can_accept_client_connections == other.can_accept_client_connections &&
    is_in_offline_mode == other.is_in_offline_mode &&
    is_writable == other.is_writable &&
    are_all_mysql_instances_healthy == other.are_all_mysql_instances_healthy &&
    is_storage_full == other.is_storage_full &&
    gtid_set == other.gtid_set &&
    is_gtid_set_applied == other.is_gtid_set_applied &&
    channels_status == other.channels_status
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 204

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


184
185
186
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 184

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



193
194
195
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 193

def hash
  [can_accept_client_connections, is_in_offline_mode, is_writable, are_all_mysql_instances_healthy, is_storage_full, gtid_set, is_gtid_set_applied, channels_status].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



237
238
239
240
241
242
243
244
245
246
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 237

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



231
232
233
# File 'lib/oci/mysql/models/db_system_status_result.rb', line 231

def to_s
  to_hash.to_s
end