Class: OCI::Mysql::Models::GenerateDbSystemStatusDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::GenerateDbSystemStatusDetails
- Defined in:
- lib/oci/mysql/models/generate_db_system_status_details.rb
Overview
Parameters for selecting which attributes to include in the DB System status.
Constant Summary collapse
- GTID_SET_TYPE_ENUM =
[ GTID_SET_TYPE_GTID_EXECUTED = 'GTID_EXECUTED'.freeze, GTID_SET_TYPE_GTID_AVAILABLE = 'GTID_AVAILABLE'.freeze ].freeze
Instance Attribute Summary collapse
-
#channel_ids ⇒ Array<String>
List of Channel IDs for which to collect status information.
-
#gtid_set_to_apply ⇒ String
Specifies the GTID set to be checked on the DB System to determine whether it has been applied.
-
#gtid_set_type ⇒ String
Specifies whether to collect the full set of GTIDs executed on the DB System (gtid_executed) or the set of GTIDs available in the DB System binary logs, not part of (gtid_purged) (GTID_AVAILABLE, which is gtid_executed - gtid_purged).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GenerateDbSystemStatusDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ GenerateDbSystemStatusDetails
Initializes the object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 67 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.gtid_set_type = attributes[:'gtidSetType'] if attributes[:'gtidSetType'] self.gtid_set_type = "GTID_EXECUTED" if gtid_set_type.nil? && !attributes.key?(:'gtidSetType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :gtidSetType and :gtid_set_type' if attributes.key?(:'gtidSetType') && attributes.key?(:'gtid_set_type') self.gtid_set_type = attributes[:'gtid_set_type'] if attributes[:'gtid_set_type'] self.gtid_set_type = "GTID_EXECUTED" if gtid_set_type.nil? && !attributes.key?(:'gtidSetType') && !attributes.key?(:'gtid_set_type') # rubocop:disable Style/StringLiterals self.gtid_set_to_apply = attributes[:'gtidSetToApply'] if attributes[:'gtidSetToApply'] raise 'You cannot provide both :gtidSetToApply and :gtid_set_to_apply' if attributes.key?(:'gtidSetToApply') && attributes.key?(:'gtid_set_to_apply') self.gtid_set_to_apply = attributes[:'gtid_set_to_apply'] if attributes[:'gtid_set_to_apply'] self.channel_ids = attributes[:'channelIds'] if attributes[:'channelIds'] raise 'You cannot provide both :channelIds and :channel_ids' if attributes.key?(:'channelIds') && attributes.key?(:'channel_ids') self.channel_ids = attributes[:'channel_ids'] if attributes[:'channel_ids'] end |
Instance Attribute Details
#channel_ids ⇒ Array<String>
List of Channel IDs for which to collect status information.
34 35 36 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 34 def channel_ids @channel_ids end |
#gtid_set_to_apply ⇒ String
Specifies the GTID set to be checked on the DB System to determine whether it has been applied. The result of the check is isGtidSetApplied in the response.
30 31 32 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 30 def gtid_set_to_apply @gtid_set_to_apply end |
#gtid_set_type ⇒ String
Specifies whether to collect the full set of GTIDs executed on the DB System (gtid_executed) or the set of GTIDs available in the DB System binary logs, not part of (gtid_purged) (GTID_AVAILABLE, which is gtid_executed - gtid_purged). Use GTID_AVAILABLE if gtid_executed is too large to fit in the response.
24 25 26 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 24 def gtid_set_type @gtid_set_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
37 38 39 40 41 42 43 44 45 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 37 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'gtid_set_type': :'gtidSetType', 'gtid_set_to_apply': :'gtidSetToApply', 'channel_ids': :'channelIds' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 48 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'gtid_set_type': :'String', 'gtid_set_to_apply': :'String', 'channel_ids': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
109 110 111 112 113 114 115 116 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 109 def ==(other) return true if equal?(other) self.class == other.class && gtid_set_type == other.gtid_set_type && gtid_set_to_apply == other.gtid_set_to_apply && channel_ids == other.channel_ids end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 141 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
121 122 123 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 121 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
130 131 132 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 130 def hash [gtid_set_type, gtid_set_to_apply, channel_ids].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 174 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_s ⇒ String
Returns the string representation of the object
168 169 170 |
# File 'lib/oci/mysql/models/generate_db_system_status_details.rb', line 168 def to_s to_hash.to_s end |