Class: OCI::DatabaseTools::Models::DatabaseToolsMcpServerSummaryDefault

Inherits:
DatabaseToolsMcpServerSummary show all
Defined in:
lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb

Overview

Summary of the Database Tools MCP server.

Constant Summary

Constants inherited from DatabaseToolsMcpServerSummary

OCI::DatabaseTools::Models::DatabaseToolsMcpServerSummary::LIFECYCLE_STATE_ENUM, OCI::DatabaseTools::Models::DatabaseToolsMcpServerSummary::RUNTIME_IDENTITY_ENUM, OCI::DatabaseTools::Models::DatabaseToolsMcpServerSummary::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from DatabaseToolsMcpServerSummary

#built_in_roles, #compartment_id, #custom_roles, #database_tools_connection_id, #defined_tags, #display_name, #endpoints, #freeform_tags, #id, #lifecycle_details, #lifecycle_state, #locks, #related_resource, #runtime_identity, #system_tags, #time_created, #time_updated, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DatabaseToolsMcpServerSummary

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ DatabaseToolsMcpServerSummaryDefault

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 108

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

  attributes['type'] = 'DEFAULT'

  super(attributes)

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

  self.domain_id = attributes[:'domainId'] if attributes[:'domainId']

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

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

  self.domain_app_id = attributes[:'domainAppId'] if attributes[:'domainAppId']

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

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

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

Instance Attribute Details

#domain_app_idString

The OCID of the associated domain application (Oracle Cloud Service).

Returns:

  • (String)


18
19
20
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 18

def domain_app_id
  @domain_app_id
end

#domain_idString

[Required] The OCID of the associated identity domain.

Returns:

  • (String)


14
15
16
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 14

def domain_id
  @domain_id
end

#storageOCI::DatabaseTools::Models::DatabaseToolsMcpServerStorage

This attribute is required.



22
23
24
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 22

def storage
  @storage
end

Class Method Details

.attribute_mapObject

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



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 25

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'type': :'type',
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'database_tools_connection_id': :'databaseToolsConnectionId',
    'endpoints': :'endpoints',
    'built_in_roles': :'builtInRoles',
    'custom_roles': :'customRoles',
    'related_resource': :'relatedResource',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_details': :'lifecycleDetails',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'defined_tags': :'definedTags',
    'freeform_tags': :'freeformTags',
    'system_tags': :'systemTags',
    'runtime_identity': :'runtimeIdentity',
    'locks': :'locks',
    'domain_id': :'domainId',
    'domain_app_id': :'domainAppId',
    'storage': :'storage'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 54

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'type': :'String',
    'compartment_id': :'String',
    'display_name': :'String',
    'database_tools_connection_id': :'String',
    'endpoints': :'Array<OCI::DatabaseTools::Models::DatabaseToolsMcpServerEndpoint>',
    'built_in_roles': :'Array<OCI::DatabaseTools::Models::DatabaseToolsMcpServerBuiltInRole>',
    'custom_roles': :'Array<OCI::DatabaseTools::Models::DatabaseToolsMcpServerCustomRole>',
    'related_resource': :'OCI::DatabaseTools::Models::DatabaseToolsMcpServerRelatedResource',
    'lifecycle_state': :'String',
    'lifecycle_details': :'String',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'freeform_tags': :'Hash<String, String>',
    'system_tags': :'Hash<String, Hash<String, Object>>',
    'runtime_identity': :'String',
    'locks': :'Array<OCI::DatabaseTools::Models::ResourceLock>',
    'domain_id': :'String',
    'domain_app_id': :'String',
    'storage': :'OCI::DatabaseTools::Models::DatabaseToolsMcpServerStorage'
    # 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



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 140

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

  self.class == other.class &&
    id == other.id &&
    type == other.type &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    database_tools_connection_id == other.database_tools_connection_id &&
    endpoints == other.endpoints &&
    built_in_roles == other.built_in_roles &&
    custom_roles == other.custom_roles &&
    related_resource == other.related_resource &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_details == other.lifecycle_details &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    defined_tags == other.defined_tags &&
    freeform_tags == other.freeform_tags &&
    system_tags == other.system_tags &&
    runtime_identity == other.runtime_identity &&
    locks == other.locks &&
    domain_id == other.domain_id &&
    domain_app_id == other.domain_app_id &&
    storage == other.storage
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



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 190

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


170
171
172
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 170

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



179
180
181
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 179

def hash
  [id, type, compartment_id, display_name, database_tools_connection_id, endpoints, built_in_roles, custom_roles, related_resource, lifecycle_state, lifecycle_details, time_created, time_updated, defined_tags, freeform_tags, system_tags, runtime_identity, locks, domain_id, domain_app_id, storage].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



223
224
225
226
227
228
229
230
231
232
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 223

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



217
218
219
# File 'lib/oci/database_tools/models/database_tools_mcp_server_summary_default.rb', line 217

def to_s
  to_hash.to_s
end