Class: OCI::DatabaseToolsRuntime::Models::DatabaseToolsDatabaseApiGatewayConfigPool

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb

Overview

The content of a Database Tools database API gateway config pool sub resource. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class

Constant Summary collapse

TYPE_ENUM =
[
  TYPE_DEFAULT = 'DEFAULT'.freeze,
  TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
DATABASE_ACTIONS_STATUS_ENUM =
[
  DATABASE_ACTIONS_STATUS_ENABLED = 'ENABLED'.freeze,
  DATABASE_ACTIONS_STATUS_DISABLED = 'DISABLED'.freeze,
  DATABASE_ACTIONS_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
REST_ENABLED_SQL_STATUS_ENUM =
[
  REST_ENABLED_SQL_STATUS_ENABLED = 'ENABLED'.freeze,
  REST_ENABLED_SQL_STATUS_DISABLED = 'DISABLED'.freeze,
  REST_ENABLED_SQL_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ DatabaseToolsDatabaseApiGatewayConfigPool

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :key (String)

    The value to assign to the #key property

  • :type (String)

    The value to assign to the #type property

  • :display_name (String)

    The value to assign to the #display_name property

  • :pool_route_value (String)

    The value to assign to the #pool_route_value property

  • :database_tools_connection_id (String)

    The value to assign to the #database_tools_connection_id property

  • :max_pool_size (Integer)

    The value to assign to the #max_pool_size property

  • :min_pool_size (Integer)

    The value to assign to the #min_pool_size property

  • :initial_pool_size (Integer)

    The value to assign to the #initial_pool_size property

  • :jwt_profile_jwk_url (String)

    The value to assign to the #jwt_profile_jwk_url property

  • :jwt_profile_issuer (String)

    The value to assign to the #jwt_profile_issuer property

  • :jwt_profile_audience (String)

    The value to assign to the #jwt_profile_audience property

  • :jwt_profile_role_claim_name (String)

    The value to assign to the #jwt_profile_role_claim_name property

  • :database_actions_status (String)

    The value to assign to the #database_actions_status property

  • :rest_enabled_sql_status (String)

    The value to assign to the #rest_enabled_sql_status property

  • :advanced_properties (Hash<String, String>)

    The value to assign to the #advanced_properties property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property



186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 186

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.key = attributes[:'key'] if attributes[:'key']

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.pool_route_value = attributes[:'poolRouteValue'] if attributes[:'poolRouteValue']

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

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

  self.database_tools_connection_id = attributes[:'databaseToolsConnectionId'] if attributes[:'databaseToolsConnectionId']

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

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

  self.max_pool_size = attributes[:'maxPoolSize'] if attributes[:'maxPoolSize']

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

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

  self.min_pool_size = attributes[:'minPoolSize'] if attributes[:'minPoolSize']

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

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

  self.initial_pool_size = attributes[:'initialPoolSize'] if attributes[:'initialPoolSize']

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

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

  self.jwt_profile_jwk_url = attributes[:'jwtProfileJwkUrl'] if attributes[:'jwtProfileJwkUrl']

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

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

  self.jwt_profile_issuer = attributes[:'jwtProfileIssuer'] if attributes[:'jwtProfileIssuer']

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

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

  self.jwt_profile_audience = attributes[:'jwtProfileAudience'] if attributes[:'jwtProfileAudience']

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

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

  self.jwt_profile_role_claim_name = attributes[:'jwtProfileRoleClaimName'] if attributes[:'jwtProfileRoleClaimName']

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

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

  self.database_actions_status = attributes[:'databaseActionsStatus'] if attributes[:'databaseActionsStatus']
  self.database_actions_status = "DISABLED" if database_actions_status.nil? && !attributes.key?(:'databaseActionsStatus') # rubocop:disable Style/StringLiterals

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

  self.database_actions_status = attributes[:'database_actions_status'] if attributes[:'database_actions_status']
  self.database_actions_status = "DISABLED" if database_actions_status.nil? && !attributes.key?(:'databaseActionsStatus') && !attributes.key?(:'database_actions_status') # rubocop:disable Style/StringLiterals

  self.rest_enabled_sql_status = attributes[:'restEnabledSqlStatus'] if attributes[:'restEnabledSqlStatus']
  self.rest_enabled_sql_status = "DISABLED" if rest_enabled_sql_status.nil? && !attributes.key?(:'restEnabledSqlStatus') # rubocop:disable Style/StringLiterals

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

  self.rest_enabled_sql_status = attributes[:'rest_enabled_sql_status'] if attributes[:'rest_enabled_sql_status']
  self.rest_enabled_sql_status = "DISABLED" if rest_enabled_sql_status.nil? && !attributes.key?(:'restEnabledSqlStatus') && !attributes.key?(:'rest_enabled_sql_status') # rubocop:disable Style/StringLiterals

  self.advanced_properties = attributes[:'advancedProperties'] if attributes[:'advancedProperties']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

Instance Attribute Details

#advanced_propertiesHash<String, String>

Advanced pool properties.

Returns:

  • (Hash<String, String>)


88
89
90
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 88

def advanced_properties
  @advanced_properties
end

#database_actions_statusString

Specifies to enable the Database Actions feature.

Returns:

  • (String)


80
81
82
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 80

def database_actions_status
  @database_actions_status
end

#database_tools_connection_idString

The OCID of the related Database Tools connection. Specifies the OCI database tools connection ocid to build the connection pool from.

Returns:

  • (String)


48
49
50
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 48

def database_tools_connection_id
  @database_tools_connection_id
end

#display_nameString

A user-friendly name. Does not have to be unique, and itu2019s changeable. Avoid entering confidential information.

Returns:

  • (String)


40
41
42
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 40

def display_name
  @display_name
end

#initial_pool_sizeInteger

Specifies the initial size for the number of database connections that will be created for the pool.

Returns:

  • (Integer)


60
61
62
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 60

def initial_pool_size
  @initial_pool_size
end

#jwt_profile_audienceString

Specifies the expected audience for the JWT token. This value is used to validate the aud claim in the JWT token.

Returns:

  • (String)


72
73
74
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 72

def jwt_profile_audience
  @jwt_profile_audience
end

#jwt_profile_issuerString

Specifies the issuer of the JWT token. This value is used to validate the iss claim in the JWT token.

Returns:

  • (String)


68
69
70
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 68

def jwt_profile_issuer
  @jwt_profile_issuer
end

#jwt_profile_jwk_urlString

Specifies the URL of the JSON Web Key (JWK) that is used to verify the signature of the JWT token.

Returns:

  • (String)


64
65
66
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 64

def jwt_profile_jwk_url
  @jwt_profile_jwk_url
end

#jwt_profile_role_claim_nameString

Specifies the JSON pointer to the claim in the JWT token that contains the roles of the users.

Returns:

  • (String)


76
77
78
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 76

def jwt_profile_role_claim_name
  @jwt_profile_role_claim_name
end

#keyString

[Required] A system generated string that uniquely identifies a pool sub resource.

Returns:

  • (String)


32
33
34
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 32

def key
  @key
end

#max_pool_sizeInteger

Specifies the maximum number of database connections allowed for the pool.

Returns:

  • (Integer)


52
53
54
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 52

def max_pool_size
  @max_pool_size
end

#min_pool_sizeInteger

Specifies the minimum number of database connections allowed for the pool.

Returns:

  • (Integer)


56
57
58
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 56

def min_pool_size
  @min_pool_size
end

#pool_route_valueString

The pool route value provided in requests to target this pool.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 44

def pool_route_value
  @pool_route_value
end

#rest_enabled_sql_statusString

Specifies whether the REST-Enabled SQL service is active.

Returns:

  • (String)


84
85
86
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 84

def rest_enabled_sql_status
  @rest_enabled_sql_status
end

#time_createdDateTime

[Required] The time the resource was created. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


92
93
94
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 92

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The time the resource was updated. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


96
97
98
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 96

def time_updated
  @time_updated
end

#typeString

[Required] The type of the Database Tools database API gateway config pool sub resource.

Returns:

  • (String)


36
37
38
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 36

def type
  @type
end

Class Method Details

.attribute_mapObject

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



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 99

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'type': :'type',
    'display_name': :'displayName',
    'pool_route_value': :'poolRouteValue',
    'database_tools_connection_id': :'databaseToolsConnectionId',
    'max_pool_size': :'maxPoolSize',
    'min_pool_size': :'minPoolSize',
    'initial_pool_size': :'initialPoolSize',
    'jwt_profile_jwk_url': :'jwtProfileJwkUrl',
    'jwt_profile_issuer': :'jwtProfileIssuer',
    'jwt_profile_audience': :'jwtProfileAudience',
    'jwt_profile_role_claim_name': :'jwtProfileRoleClaimName',
    'database_actions_status': :'databaseActionsStatus',
    'rest_enabled_sql_status': :'restEnabledSqlStatus',
    'advanced_properties': :'advancedProperties',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.get_subtype(object_hash) ⇒ Object

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.



153
154
155
156
157
158
159
160
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 153

def self.get_subtype(object_hash)
  type = object_hash[:'type'] # rubocop:disable Style/SymbolLiteral

  return 'OCI::DatabaseToolsRuntime::Models::DatabaseToolsDatabaseApiGatewayConfigPoolDefault' if type == 'DEFAULT'

  # TODO: Log a warning when the subtype is not found.
  'OCI::DatabaseToolsRuntime::Models::DatabaseToolsDatabaseApiGatewayConfigPool'
end

.swagger_typesObject

Attribute type mapping.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 124

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'type': :'String',
    'display_name': :'String',
    'pool_route_value': :'String',
    'database_tools_connection_id': :'String',
    'max_pool_size': :'Integer',
    'min_pool_size': :'Integer',
    'initial_pool_size': :'Integer',
    'jwt_profile_jwk_url': :'String',
    'jwt_profile_issuer': :'String',
    'jwt_profile_audience': :'String',
    'jwt_profile_role_claim_name': :'String',
    'database_actions_status': :'String',
    'rest_enabled_sql_status': :'String',
    'advanced_properties': :'Hash<String, String>',
    'time_created': :'DateTime',
    'time_updated': :'DateTime'
    # 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



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 337

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

  self.class == other.class &&
    key == other.key &&
    type == other.type &&
    display_name == other.display_name &&
    pool_route_value == other.pool_route_value &&
    database_tools_connection_id == other.database_tools_connection_id &&
    max_pool_size == other.max_pool_size &&
    min_pool_size == other.min_pool_size &&
    initial_pool_size == other.initial_pool_size &&
    jwt_profile_jwk_url == other.jwt_profile_jwk_url &&
    jwt_profile_issuer == other.jwt_profile_issuer &&
    jwt_profile_audience == other.jwt_profile_audience &&
    jwt_profile_role_claim_name == other.jwt_profile_role_claim_name &&
    database_actions_status == other.database_actions_status &&
    rest_enabled_sql_status == other.rest_enabled_sql_status &&
    advanced_properties == other.advanced_properties &&
    time_created == other.time_created &&
    time_updated == other.time_updated
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



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 383

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


363
364
365
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 363

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



372
373
374
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 372

def hash
  [key, type, display_name, pool_route_value, database_tools_connection_id, max_pool_size, min_pool_size, initial_pool_size, jwt_profile_jwk_url, jwt_profile_issuer, jwt_profile_audience, jwt_profile_role_claim_name, database_actions_status, rest_enabled_sql_status, advanced_properties, time_created, time_updated].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



416
417
418
419
420
421
422
423
424
425
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 416

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



410
411
412
# File 'lib/oci/database_tools_runtime/models/database_tools_database_api_gateway_config_pool.rb', line 410

def to_s
  to_hash.to_s
end