Class: OCI::DataFlow::Models::UpdateSqlEndpointDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_flow/models/update_sql_endpoint_details.rb

Overview

The information about all updatable parameters of a SQL Endpoint.

Constant Summary collapse

LOG_OPERATION_ENUM =
[
  LOG_OPERATION_ENABLE = 'ENABLE'.freeze,
  LOG_OPERATION_DISABLE = 'DISABLE'.freeze,
  LOG_OPERATION_DELETE = 'DELETE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateSqlEndpointDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 173

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

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

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

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

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

  self.driver_shape_config = attributes[:'driverShapeConfig'] if attributes[:'driverShapeConfig']

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

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

  self.executor_shape = attributes[:'executorShape'] if attributes[:'executorShape']

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

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

  self.executor_shape_config = attributes[:'executorShapeConfig'] if attributes[:'executorShapeConfig']

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

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

  self.min_executor_count = attributes[:'minExecutorCount'] if attributes[:'minExecutorCount']

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

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

  self.max_executor_count = attributes[:'maxExecutorCount'] if attributes[:'maxExecutorCount']

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

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

  self.metastore_id = attributes[:'metastoreId'] if attributes[:'metastoreId']

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

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

  self.lake_id = attributes[:'lakeId'] if attributes[:'lakeId']

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

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

  self.log_group_id = attributes[:'logGroupId'] if attributes[:'logGroupId']

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

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

  self.log_compartment_id = attributes[:'logCompartmentId'] if attributes[:'logCompartmentId']

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

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

  self.log_display_name = attributes[:'logDisplayName'] if attributes[:'logDisplayName']

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

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

  self.log_retention_duration = attributes[:'logRetentionDuration'] if attributes[:'logRetentionDuration']

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

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

  self.log_operation = attributes[:'logOperation'] if attributes[:'logOperation']

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

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

  self.spark_advanced_configurations = attributes[:'sparkAdvancedConfigurations'] if attributes[:'sparkAdvancedConfigurations']

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

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

Instance Attribute Details

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


21
22
23
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 21

def defined_tags
  @defined_tags
end

#descriptionString

The description of CreateSQLEndpointDetails.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 36

def description
  @description
end

#display_nameString

The SQL Endpoint name, which can be changed.

Returns:

  • (String)


32
33
34
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 32

def display_name
  @display_name
end

#driver_shapeString

The shape of the SQL Endpoint driver instance.

Returns:

  • (String)


40
41
42
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 40

def driver_shape
  @driver_shape
end

#driver_shape_configOCI::DataFlow::Models::ShapeConfig



43
44
45
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 43

def driver_shape_config
  @driver_shape_config
end

#executor_shapeString

The shape of the SQL Endpoint worker instance.

Returns:

  • (String)


47
48
49
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 47

def executor_shape
  @executor_shape
end

#executor_shape_configOCI::DataFlow::Models::ShapeConfig



50
51
52
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 50

def executor_shape_config
  @executor_shape_config
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


28
29
30
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 28

def freeform_tags
  @freeform_tags
end

#lake_idString

OCI lake OCID

Returns:

  • (String)


66
67
68
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 66

def lake_id
  @lake_id
end

#log_compartment_idString

The identifier of the log group compartment used with the SQL Endpoint.

Returns:

  • (String)


74
75
76
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 74

def log_compartment_id
  @log_compartment_id
end

#log_display_nameString

The friendly name of the log object used with the SQL Endpoint.

Returns:

  • (String)


78
79
80
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 78

def log_display_name
  @log_display_name
end

#log_group_idString

The identifier of the log group used with the SQL Endpoint.

Returns:

  • (String)


70
71
72
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 70

def log_group_id
  @log_group_id
end

#log_operationString

The log operation will be performed for the Sql Endpoint.

Returns:

  • (String)


86
87
88
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 86

def log_operation
  @log_operation
end

#log_retention_durationInteger

Log retention duration in days

Returns:

  • (Integer)


82
83
84
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 82

def log_retention_duration
  @log_retention_duration
end

#max_executor_countInteger

The maximum number of executors.

Returns:

  • (Integer)


58
59
60
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 58

def max_executor_count
  @max_executor_count
end

#metastore_idString

Metastore OCID

Returns:

  • (String)


62
63
64
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 62

def metastore_id
  @metastore_id
end

#min_executor_countInteger

The minimum number of executors.

Returns:

  • (Integer)


54
55
56
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 54

def min_executor_count
  @min_executor_count
end

#spark_advanced_configurationsHash<String, String>

The Spark configuration passed to the running process. See spark.apache.org/docs/latest/configuration.html#available-properties. Example: { "spark.app.name" : "My App Name", "spark.shuffle.io.maxRetries" : "4" } Note: Not all Spark properties are permitted to be set. Attempting to set a property that is not allowed to be overwritten will cause a 400 status to be returned.

Returns:

  • (Hash<String, String>)


95
96
97
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 95

def spark_advanced_configurations
  @spark_advanced_configurations
end

Class Method Details

.attribute_mapObject

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



98
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/data_flow/models/update_sql_endpoint_details.rb', line 98

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'defined_tags': :'definedTags',
    'freeform_tags': :'freeformTags',
    'display_name': :'displayName',
    'description': :'description',
    'driver_shape': :'driverShape',
    'driver_shape_config': :'driverShapeConfig',
    'executor_shape': :'executorShape',
    'executor_shape_config': :'executorShapeConfig',
    'min_executor_count': :'minExecutorCount',
    'max_executor_count': :'maxExecutorCount',
    'metastore_id': :'metastoreId',
    'lake_id': :'lakeId',
    'log_group_id': :'logGroupId',
    'log_compartment_id': :'logCompartmentId',
    'log_display_name': :'logDisplayName',
    'log_retention_duration': :'logRetentionDuration',
    'log_operation': :'logOperation',
    'spark_advanced_configurations': :'sparkAdvancedConfigurations'
    # rubocop:enable Style/SymbolLiteral
  }
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
147
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 124

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'freeform_tags': :'Hash<String, String>',
    'display_name': :'String',
    'description': :'String',
    'driver_shape': :'String',
    'driver_shape_config': :'OCI::DataFlow::Models::ShapeConfig',
    'executor_shape': :'String',
    'executor_shape_config': :'OCI::DataFlow::Models::ShapeConfig',
    'min_executor_count': :'Integer',
    'max_executor_count': :'Integer',
    'metastore_id': :'String',
    'lake_id': :'String',
    'log_group_id': :'String',
    'log_compartment_id': :'String',
    'log_display_name': :'String',
    'log_retention_duration': :'Integer',
    'log_operation': :'String',
    'spark_advanced_configurations': :'Hash<String, 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



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 299

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

  self.class == other.class &&
    defined_tags == other.defined_tags &&
    freeform_tags == other.freeform_tags &&
    display_name == other.display_name &&
    description == other.description &&
    driver_shape == other.driver_shape &&
    driver_shape_config == other.driver_shape_config &&
    executor_shape == other.executor_shape &&
    executor_shape_config == other.executor_shape_config &&
    min_executor_count == other.min_executor_count &&
    max_executor_count == other.max_executor_count &&
    metastore_id == other.metastore_id &&
    lake_id == other.lake_id &&
    log_group_id == other.log_group_id &&
    log_compartment_id == other.log_compartment_id &&
    log_display_name == other.log_display_name &&
    log_retention_duration == other.log_retention_duration &&
    log_operation == other.log_operation &&
    spark_advanced_configurations == other.spark_advanced_configurations
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



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 346

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


326
327
328
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 326

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



335
336
337
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 335

def hash
  [defined_tags, freeform_tags, display_name, description, driver_shape, driver_shape_config, executor_shape, executor_shape_config, min_executor_count, max_executor_count, metastore_id, lake_id, log_group_id, log_compartment_id, log_display_name, log_retention_duration, log_operation, spark_advanced_configurations].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



379
380
381
382
383
384
385
386
387
388
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 379

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



373
374
375
# File 'lib/oci/data_flow/models/update_sql_endpoint_details.rb', line 373

def to_s
  to_hash.to_s
end