Class: OCI::DataFlow::Models::CreateSqlEndpointDetails

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

Overview

The information about a new SQL Endpoint.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateSqlEndpointDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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

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

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

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

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

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

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

  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.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.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']

  self.network_configuration = attributes[:'networkConfiguration'] if attributes[:'networkConfiguration']

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

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

Instance Attribute Details

#compartment_idString

[Required] The identifier of the compartment used with the SQL Endpoint.

Returns:

  • (String)


13
14
15
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 13

def compartment_id
  @compartment_id
end

#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>>)


72
73
74
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 72

def defined_tags
  @defined_tags
end

#descriptionString

The description of CreateSQLEndpointDetails.

Returns:

  • (String)


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

def description
  @description
end

#display_nameString

[Required] The SQL Endpoint name, which can be changed.

Returns:

  • (String)


17
18
19
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 17

def display_name
  @display_name
end

#driver_shapeString

[Required] The shape of the SQL Endpoint driver instance.

Returns:

  • (String)


29
30
31
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 29

def driver_shape
  @driver_shape
end

#driver_shape_configOCI::DataFlow::Models::ShapeConfig



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

def driver_shape_config
  @driver_shape_config
end

#executor_shapeString

[Required] The shape of the SQL Endpoint worker instance.

Returns:

  • (String)


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

def executor_shape
  @executor_shape
end

#executor_shape_configOCI::DataFlow::Models::ShapeConfig



39
40
41
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 39

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>)


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

def freeform_tags
  @freeform_tags
end

#lake_idString

[Required] OCI lake OCID

Returns:

  • (String)


55
56
57
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 55

def lake_id
  @lake_id
end

#max_executor_countInteger

[Required] The maximum number of executors.

Returns:

  • (Integer)


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

def max_executor_count
  @max_executor_count
end

#metastore_idString

[Required] Metastore OCID

Returns:

  • (String)


51
52
53
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 51

def metastore_id
  @metastore_id
end

#min_executor_countInteger

[Required] The minimum number of executors.

Returns:

  • (Integer)


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

def min_executor_count
  @min_executor_count
end

#network_configurationOCI::DataFlow::Models::SqlEndpointNetworkConfiguration

This attribute is required.



85
86
87
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 85

def network_configuration
  @network_configuration
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>)


81
82
83
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 81

def spark_advanced_configurations
  @spark_advanced_configurations
end

#sql_endpoint_versionString

[Required] The version of the SQL Endpoint.

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 25

def sql_endpoint_version
  @sql_endpoint_version
end

#warehouse_bucket_uriString

[Required] The warehouse bucket URI. It is a Oracle Cloud Infrastructure Object Storage bucket URI as defined here docs.oracle.com/en/cloud/paas/atp-cloud/atpud/object-storage-uris.html

Returns:

  • (String)


59
60
61
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 59

def warehouse_bucket_uri
  @warehouse_bucket_uri
end

Class Method Details

.attribute_mapObject

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



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 88

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'compartmentId',
    'display_name': :'displayName',
    'description': :'description',
    'sql_endpoint_version': :'sqlEndpointVersion',
    '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',
    'warehouse_bucket_uri': :'warehouseBucketUri',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'spark_advanced_configurations': :'sparkAdvancedConfigurations',
    'network_configuration': :'networkConfiguration'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 113

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'compartment_id': :'String',
    'display_name': :'String',
    'description': :'String',
    'sql_endpoint_version': :'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',
    'warehouse_bucket_uri': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'spark_advanced_configurations': :'Hash<String, String>',
    'network_configuration': :'OCI::DataFlow::Models::SqlEndpointNetworkConfiguration'
    # 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



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 272

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

  self.class == other.class &&
    compartment_id == other.compartment_id &&
    display_name == other.display_name &&
    description == other.description &&
    sql_endpoint_version == other.sql_endpoint_version &&
    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 &&
    warehouse_bucket_uri == other.warehouse_bucket_uri &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    spark_advanced_configurations == other.spark_advanced_configurations &&
    network_configuration == other.network_configuration
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



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 318

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


298
299
300
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 298

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



307
308
309
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 307

def hash
  [compartment_id, display_name, description, sql_endpoint_version, driver_shape, driver_shape_config, executor_shape, executor_shape_config, min_executor_count, max_executor_count, metastore_id, lake_id, warehouse_bucket_uri, freeform_tags, defined_tags, spark_advanced_configurations, network_configuration].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



351
352
353
354
355
356
357
358
359
360
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 351

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



345
346
347
# File 'lib/oci/data_flow/models/create_sql_endpoint_details.rb', line 345

def to_s
  to_hash.to_s
end