Class: OCI::DatabaseManagement::Models::SqlTuningSetAdminActionStatus
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::SqlTuningSetAdminActionStatus
- Defined in:
- lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb
Overview
The status of a Sql tuning set admin action.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_SUCCEEDED = 'SUCCEEDED'.freeze, STATUS_FAILED = 'FAILED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#error_code ⇒ Integer
The error code that denotes failure if the Sql tuning set admin action is not successful.
-
#error_message ⇒ String
The error message that indicates the reason for failure if the Sql tuning set admin action is not successful.
-
#show_sql_only ⇒ Integer
Flag to indicate whether to create the Sql tuning set or just display the plsql used for the selected user action.
-
#sql_statement ⇒ String
When showSqlOnly is set to 1, this attribute displays the plsql generated for the selected user action.
-
#status ⇒ String
[Required] The status of a Sql tuning set admin action.
-
#success_message ⇒ String
The success message of the Sql tuning set admin action.
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 = {}) ⇒ SqlTuningSetAdminActionStatus
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 = {}) ⇒ SqlTuningSetAdminActionStatus
Initializes the object
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 89 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.status = attributes[:'status'] if attributes[:'status'] self. = attributes[:'successMessage'] if attributes[:'successMessage'] raise 'You cannot provide both :successMessage and :success_message' if attributes.key?(:'successMessage') && attributes.key?(:'success_message') self. = attributes[:'success_message'] if attributes[:'success_message'] self.error_code = attributes[:'errorCode'] if attributes[:'errorCode'] raise 'You cannot provide both :errorCode and :error_code' if attributes.key?(:'errorCode') && attributes.key?(:'error_code') self.error_code = attributes[:'error_code'] if attributes[:'error_code'] self. = attributes[:'errorMessage'] if attributes[:'errorMessage'] raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message') self. = attributes[:'error_message'] if attributes[:'error_message'] self.show_sql_only = attributes[:'showSqlOnly'] if attributes[:'showSqlOnly'] raise 'You cannot provide both :showSqlOnly and :show_sql_only' if attributes.key?(:'showSqlOnly') && attributes.key?(:'show_sql_only') self.show_sql_only = attributes[:'show_sql_only'] if attributes[:'show_sql_only'] self.sql_statement = attributes[:'sqlStatement'] if attributes[:'sqlStatement'] raise 'You cannot provide both :sqlStatement and :sql_statement' if attributes.key?(:'sqlStatement') && attributes.key?(:'sql_statement') self.sql_statement = attributes[:'sql_statement'] if attributes[:'sql_statement'] end |
Instance Attribute Details
#error_code ⇒ Integer
The error code that denotes failure if the Sql tuning set admin action is not successful. The error code is "null" if the admin action is successful.
31 32 33 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 31 def error_code @error_code end |
#error_message ⇒ String
The error message that indicates the reason for failure if the Sql tuning set admin action is not successful. The error message is "null" if the admin action is successful.
36 37 38 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 36 def @error_message end |
#show_sql_only ⇒ Integer
Flag to indicate whether to create the Sql tuning set or just display the plsql used for the selected user action.
41 42 43 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 41 def show_sql_only @show_sql_only end |
#sql_statement ⇒ String
When showSqlOnly is set to 1, this attribute displays the plsql generated for the selected user action. When showSqlOnly is set to 0, this attribute will not be returned.
47 48 49 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 47 def sql_statement @sql_statement end |
#status ⇒ String
[Required] The status of a Sql tuning set admin action.
21 22 23 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 21 def status @status end |
#success_message ⇒ String
The success message of the Sql tuning set admin action. The success message is "null" if the admin action is non successful.
26 27 28 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 26 def @success_message end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'status': :'status', 'success_message': :'successMessage', 'error_code': :'errorCode', 'error_message': :'errorMessage', 'show_sql_only': :'showSqlOnly', 'sql_statement': :'sqlStatement' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 64 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'status': :'String', 'success_message': :'String', 'error_code': :'Integer', 'error_message': :'String', 'show_sql_only': :'Integer', 'sql_statement': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 148 def ==(other) return true if equal?(other) self.class == other.class && status == other.status && == other. && error_code == other.error_code && == other. && show_sql_only == other.show_sql_only && sql_statement == other.sql_statement end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 183 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
163 164 165 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 172 def hash [status, , error_code, , show_sql_only, sql_statement].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 216 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
210 211 212 |
# File 'lib/oci/database_management/models/sql_tuning_set_admin_action_status.rb', line 210 def to_s to_hash.to_s end |