Class: OCI::DatabaseTools::Models::CreateDatabaseToolsMcpServerDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseTools::Models::CreateDatabaseToolsMcpServerDetails
- Defined in:
- lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb
Overview
Details for the new Database Tools MCP server. 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
Direct Known Subclasses
Constant Summary collapse
- TYPE_ENUM =
[ TYPE_DEFAULT = 'DEFAULT'.freeze ].freeze
- RUNTIME_IDENTITY_ENUM =
[ RUNTIME_IDENTITY_AUTHENTICATED_PRINCIPAL = 'AUTHENTICATED_PRINCIPAL'.freeze, RUNTIME_IDENTITY_RESOURCE_PRINCIPAL = 'RESOURCE_PRINCIPAL'.freeze ].freeze
Instance Attribute Summary collapse
-
#access_token_expiry_in_seconds ⇒ Integer
Access token expiry in seconds.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the Database Tools MCP server.
-
#custom_roles ⇒ Array<OCI::DatabaseTools::Models::DatabaseToolsMcpServerCustomRole>
Custom Roles associated with the MCP Server.
-
#database_tools_connection_id ⇒ String
[Required] The OCID of the related Database Tools connection.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A human-readable description of the Database Tools MCP server.
-
#display_name ⇒ String
[Required] A meaningful, human-readable label displayed to end users.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#locks ⇒ Array<OCI::DatabaseTools::Models::ResourceLock>
Locks associated with this resource.
-
#refresh_token_expiry_in_seconds ⇒ Integer
Refresh token expiry in seconds.
-
#runtime_identity ⇒ String
Specifies the identity used when accessing OCI resources at runtime.
-
#type ⇒ String
[Required] The Database Tools MCP server type.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.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.
-
.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 = {}) ⇒ CreateDatabaseToolsMcpServerDetails
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 = {}) ⇒ CreateDatabaseToolsMcpServerDetails
Initializes the object
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 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 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 147 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.type = attributes[:'type'] if attributes[:'type'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.custom_roles = attributes[:'customRoles'] if attributes[:'customRoles'] raise 'You cannot provide both :customRoles and :custom_roles' if attributes.key?(:'customRoles') && attributes.key?(:'custom_roles') self.custom_roles = attributes[:'custom_roles'] if attributes[:'custom_roles'] 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.description = attributes[:'description'] if attributes[:'description'] 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.access_token_expiry_in_seconds = attributes[:'accessTokenExpiryInSeconds'] if attributes[:'accessTokenExpiryInSeconds'] raise 'You cannot provide both :accessTokenExpiryInSeconds and :access_token_expiry_in_seconds' if attributes.key?(:'accessTokenExpiryInSeconds') && attributes.key?(:'access_token_expiry_in_seconds') self.access_token_expiry_in_seconds = attributes[:'access_token_expiry_in_seconds'] if attributes[:'access_token_expiry_in_seconds'] self.refresh_token_expiry_in_seconds = attributes[:'refreshTokenExpiryInSeconds'] if attributes[:'refreshTokenExpiryInSeconds'] raise 'You cannot provide both :refreshTokenExpiryInSeconds and :refresh_token_expiry_in_seconds' if attributes.key?(:'refreshTokenExpiryInSeconds') && attributes.key?(:'refresh_token_expiry_in_seconds') self.refresh_token_expiry_in_seconds = attributes[:'refresh_token_expiry_in_seconds'] if attributes[:'refresh_token_expiry_in_seconds'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.runtime_identity = attributes[:'runtimeIdentity'] if attributes[:'runtimeIdentity'] self.runtime_identity = "AUTHENTICATED_PRINCIPAL" if runtime_identity.nil? && !attributes.key?(:'runtimeIdentity') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :runtimeIdentity and :runtime_identity' if attributes.key?(:'runtimeIdentity') && attributes.key?(:'runtime_identity') self.runtime_identity = attributes[:'runtime_identity'] if attributes[:'runtime_identity'] self.runtime_identity = "AUTHENTICATED_PRINCIPAL" if runtime_identity.nil? && !attributes.key?(:'runtimeIdentity') && !attributes.key?(:'runtime_identity') # rubocop:disable Style/StringLiterals self.locks = attributes[:'locks'] if attributes[:'locks'] end |
Instance Attribute Details
#access_token_expiry_in_seconds ⇒ Integer
Access token expiry in seconds
47 48 49 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 47 def access_token_expiry_in_seconds @access_token_expiry_in_seconds end |
#compartment_id ⇒ String
[Required] The OCID of the compartment containing the Database Tools MCP server.
27 28 29 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 27 def compartment_id @compartment_id end |
#custom_roles ⇒ Array<OCI::DatabaseTools::Models::DatabaseToolsMcpServerCustomRole>
Custom Roles associated with the MCP Server.
31 32 33 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 31 def custom_roles @custom_roles end |
#database_tools_connection_id ⇒ String
[Required] The OCID of the related Database Tools connection.
43 44 45 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 43 def database_tools_connection_id @database_tools_connection_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
57 58 59 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 57 def @defined_tags end |
#description ⇒ String
A human-readable description of the Database Tools MCP server.
39 40 41 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 39 def description @description end |
#display_name ⇒ String
[Required] A meaningful, human-readable label displayed to end users. Not required to be unique and can be changed after creation. Do not include confidential information.
35 36 37 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 35 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
63 64 65 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 63 def @freeform_tags end |
#locks ⇒ Array<OCI::DatabaseTools::Models::ResourceLock>
Locks associated with this resource.
72 73 74 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 72 def locks @locks end |
#refresh_token_expiry_in_seconds ⇒ Integer
Refresh token expiry in seconds
51 52 53 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 51 def refresh_token_expiry_in_seconds @refresh_token_expiry_in_seconds end |
#runtime_identity ⇒ String
Specifies the identity used when accessing OCI resources at runtime. AUTHENTICATED_PRINCIPAL to use the calleru2019s identity (On-Behalf-Of token), or RESOURCE_PRINCIPAL to use the MCP Serveru2019s resource principal (RPST).
68 69 70 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 68 def runtime_identity @runtime_identity end |
#type ⇒ String
[Required] The Database Tools MCP server type.
23 24 25 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 23 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 75 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'compartment_id': :'compartmentId', 'custom_roles': :'customRoles', 'display_name': :'displayName', 'description': :'description', 'database_tools_connection_id': :'databaseToolsConnectionId', 'access_token_expiry_in_seconds': :'accessTokenExpiryInSeconds', 'refresh_token_expiry_in_seconds': :'refreshTokenExpiryInSeconds', 'defined_tags': :'definedTags', 'freeform_tags': :'freeformTags', 'runtime_identity': :'runtimeIdentity', 'locks': :'locks' # 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.
119 120 121 122 123 124 125 126 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 119 def self.get_subtype(object_hash) type = object_hash[:'type'] # rubocop:disable Style/SymbolLiteral return 'OCI::DatabaseTools::Models::CreateDatabaseToolsMcpServerDefaultDetails' if type == 'DEFAULT' # TODO: Log a warning when the subtype is not found. 'OCI::DatabaseTools::Models::CreateDatabaseToolsMcpServerDetails' end |
.swagger_types ⇒ Object
Attribute type mapping.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 95 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'compartment_id': :'String', 'custom_roles': :'Array<OCI::DatabaseTools::Models::DatabaseToolsMcpServerCustomRole>', 'display_name': :'String', 'description': :'String', 'database_tools_connection_id': :'String', 'access_token_expiry_in_seconds': :'Integer', 'refresh_token_expiry_in_seconds': :'Integer', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'freeform_tags': :'Hash<String, String>', 'runtime_identity': :'String', 'locks': :'Array<OCI::DatabaseTools::Models::ResourceLock>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 239 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && compartment_id == other.compartment_id && custom_roles == other.custom_roles && display_name == other.display_name && description == other.description && database_tools_connection_id == other.database_tools_connection_id && access_token_expiry_in_seconds == other.access_token_expiry_in_seconds && refresh_token_expiry_in_seconds == other.refresh_token_expiry_in_seconds && == other. && == other. && runtime_identity == other.runtime_identity && locks == other.locks end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 280 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
260 261 262 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 260 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
269 270 271 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 269 def hash [type, compartment_id, custom_roles, display_name, description, database_tools_connection_id, access_token_expiry_in_seconds, refresh_token_expiry_in_seconds, , , runtime_identity, locks].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 313 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
307 308 309 |
# File 'lib/oci/database_tools/models/create_database_tools_mcp_server_details.rb', line 307 def to_s to_hash.to_s end |