Class: OCI::Dif::Models::AdditionalDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/dif/models/additional_details.rb

Overview

Additional details about the provisioned services

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AdditionalDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/oci/dif/models/additional_details.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.assigned_connections = attributes[:'assignedConnections'] if attributes[:'assignedConnections']

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

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

  self.model_id = attributes[:'modelId'] if attributes[:'modelId']

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

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

  self.model_version = attributes[:'modelVersion'] if attributes[:'modelVersion']

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

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

  self.oci_region = attributes[:'ociRegion'] if attributes[:'ociRegion']

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

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

  self.endpoint_details = attributes[:'endpointDetails'] if attributes[:'endpointDetails']

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

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

  self.private_endpoint_id = attributes[:'privateEndpointId'] if attributes[:'privateEndpointId']

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

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

  self.cluster_id = attributes[:'clusterId'] if attributes[:'clusterId']

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

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

  self.namespace_name = attributes[:'namespaceName'] if attributes[:'namespaceName']

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

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

Instance Attribute Details

#assigned_connectionsArray<OCI::Dif::Models::AssignedConnectionDetails>

connections assigned to Golden Gate deployment



13
14
15
# File 'lib/oci/dif/models/additional_details.rb', line 13

def assigned_connections
  @assigned_connections
end

#cluster_idString

OCID of cluster assigned to OMK cluster-namespace.

Returns:

  • (String)


37
38
39
# File 'lib/oci/dif/models/additional_details.rb', line 37

def cluster_id
  @cluster_id
end

#endpoint_detailsArray<OCI::Dif::Models::EndpointAdditional>

details of all endpoints assigned to cluster



29
30
31
# File 'lib/oci/dif/models/additional_details.rb', line 29

def endpoint_details
  @endpoint_details
end

#model_idString

OCID of model

Returns:

  • (String)


17
18
19
# File 'lib/oci/dif/models/additional_details.rb', line 17

def model_id
  @model_id
end

#model_versionString

version of model

Returns:

  • (String)


21
22
23
# File 'lib/oci/dif/models/additional_details.rb', line 21

def model_version
  @model_version
end

#namespace_nameString

Kubernetes namespace-name of omk cluster-namespace.

Returns:

  • (String)


41
42
43
# File 'lib/oci/dif/models/additional_details.rb', line 41

def namespace_name
  @namespace_name
end

#oci_regionString

region of cluster

Returns:

  • (String)


25
26
27
# File 'lib/oci/dif/models/additional_details.rb', line 25

def oci_region
  @oci_region
end

#private_endpoint_idString

OCID of model

Returns:

  • (String)


33
34
35
# File 'lib/oci/dif/models/additional_details.rb', line 33

def private_endpoint_id
  @private_endpoint_id
end

Class Method Details

.attribute_mapObject

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



44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/oci/dif/models/additional_details.rb', line 44

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'assigned_connections': :'assignedConnections',
    'model_id': :'modelId',
    'model_version': :'modelVersion',
    'oci_region': :'ociRegion',
    'endpoint_details': :'endpointDetails',
    'private_endpoint_id': :'privateEndpointId',
    'cluster_id': :'clusterId',
    'namespace_name': :'namespaceName'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/oci/dif/models/additional_details.rb', line 60

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'assigned_connections': :'Array<OCI::Dif::Models::AssignedConnectionDetails>',
    'model_id': :'String',
    'model_version': :'String',
    'oci_region': :'String',
    'endpoint_details': :'Array<OCI::Dif::Models::EndpointAdditional>',
    'private_endpoint_id': :'String',
    'cluster_id': :'String',
    'namespace_name': :'String'
    # 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



151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/oci/dif/models/additional_details.rb', line 151

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

  self.class == other.class &&
    assigned_connections == other.assigned_connections &&
    model_id == other.model_id &&
    model_version == other.model_version &&
    oci_region == other.oci_region &&
    endpoint_details == other.endpoint_details &&
    private_endpoint_id == other.private_endpoint_id &&
    cluster_id == other.cluster_id &&
    namespace_name == other.namespace_name
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



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

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


168
169
170
# File 'lib/oci/dif/models/additional_details.rb', line 168

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



177
178
179
# File 'lib/oci/dif/models/additional_details.rb', line 177

def hash
  [assigned_connections, model_id, model_version, oci_region, endpoint_details, private_endpoint_id, cluster_id, namespace_name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



221
222
223
224
225
226
227
228
229
230
# File 'lib/oci/dif/models/additional_details.rb', line 221

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



215
216
217
# File 'lib/oci/dif/models/additional_details.rb', line 215

def to_s
  to_hash.to_s
end