Class: OCI::DatabaseToolsRuntime::Models::ExecuteSqlOutputDispositionObjectStorageDetails

Inherits:
ExecuteSqlOutputDispositionDetails show all
Defined in:
lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb

Overview

Describes how the result of a statement is stored in Object Storage

Constant Summary collapse

STORAGE_TIER_ENUM =
[
  STORAGE_TIER_STANDARD = 'STANDARD'.freeze,
  STORAGE_TIER_INFREQUENT_ACCESS = 'INFREQUENT_ACCESS'.freeze,
  STORAGE_TIER_ARCHIVE = 'ARCHIVE'.freeze,
  STORAGE_TIER_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Constants inherited from ExecuteSqlOutputDispositionDetails

OCI::DatabaseToolsRuntime::Models::ExecuteSqlOutputDispositionDetails::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from ExecuteSqlOutputDispositionDetails

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ExecuteSqlOutputDispositionDetails

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ ExecuteSqlOutputDispositionObjectStorageDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :namespace (String)

    The value to assign to the #namespace property

  • :bucket_name (String)

    The value to assign to the #bucket_name property

  • :object_name (String)

    The value to assign to the #object_name property

  • :content_type (String)

    The value to assign to the #content_type property

  • :content_disposition (String)

    The value to assign to the #content_disposition property

  • :content_encoding (String)

    The value to assign to the #content_encoding property

  • :cache_control (String)

    The value to assign to the #cache_control property

  • :content_language (String)

    The value to assign to the #content_language property

  • :opc_meta (Hash<String, String>)

    The value to assign to the #opc_meta property

  • :opc_sse_customer_algorithm (String)

    The value to assign to the #opc_sse_customer_algorithm property

  • :opc_sse_customer_key (String)

    The value to assign to the #opc_sse_customer_key property

  • :opc_sse_customer_key_sha256 (String)

    The value to assign to the #opc_sse_customer_key_sha256 property

  • :opc_sse_kms_key_id (String)

    The value to assign to the #opc_sse_kms_key_id property

  • :storage_tier (String)

    The value to assign to the #storage_tier property



142
143
144
145
146
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 142

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

  attributes['type'] = 'OBJECT_STORAGE'

  super(attributes)

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

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

  self.bucket_name = attributes[:'bucketName'] if attributes[:'bucketName']

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

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

  self.object_name = attributes[:'objectName'] if attributes[:'objectName']

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

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

  self.content_type = attributes[:'contentType'] if attributes[:'contentType']

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

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

  self.content_disposition = attributes[:'contentDisposition'] if attributes[:'contentDisposition']

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

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

  self.content_encoding = attributes[:'contentEncoding'] if attributes[:'contentEncoding']

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

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

  self.cache_control = attributes[:'cacheControl'] if attributes[:'cacheControl']

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

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

  self.content_language = attributes[:'contentLanguage'] if attributes[:'contentLanguage']

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

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

  self.opc_meta = attributes[:'opcMeta'] if attributes[:'opcMeta']

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

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

  self.opc_sse_customer_algorithm = attributes[:'opcSseCustomerAlgorithm'] if attributes[:'opcSseCustomerAlgorithm']

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

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

  self.opc_sse_customer_key = attributes[:'opcSseCustomerKey'] if attributes[:'opcSseCustomerKey']

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

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

  self.opc_sse_customer_key_sha256 = attributes[:'opcSseCustomerKeySha256'] if attributes[:'opcSseCustomerKeySha256']

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

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

  self.opc_sse_kms_key_id = attributes[:'opcSseKmsKeyId'] if attributes[:'opcSseKmsKeyId']

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

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

  self.storage_tier = attributes[:'storageTier'] if attributes[:'storageTier']

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

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

Instance Attribute Details

#bucket_nameString

[Required] The name of the object storage bucket

Returns:

  • (String)


26
27
28
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 26

def bucket_name
  @bucket_name
end

#cache_controlString

The Cache-Control header

Returns:

  • (String)


46
47
48
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 46

def cache_control
  @cache_control
end

#content_dispositionString

The content disposition

Returns:

  • (String)


38
39
40
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 38

def content_disposition
  @content_disposition
end

#content_encodingString

The content encoding

Returns:

  • (String)


42
43
44
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 42

def content_encoding
  @content_encoding
end

#content_languageString

The content language

Returns:

  • (String)


50
51
52
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 50

def content_language
  @content_language
end

#content_typeString

The content type

Returns:

  • (String)


34
35
36
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 34

def content_type
  @content_type
end

#namespaceString

[Required] The name of the object storage namespace

Returns:

  • (String)


22
23
24
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 22

def namespace
  @namespace
end

#object_nameString

[Required] The name of the object template (can contain statementId placeholder, for example; query_statementId.csv )

Returns:

  • (String)


30
31
32
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 30

def object_name
  @object_name
end

#opc_metaHash<String, String>

The object metadata

Returns:

  • (Hash<String, String>)


54
55
56
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 54

def opc_meta
  @opc_meta
end

#opc_sse_customer_algorithmString

The Encryption Algorithm

Returns:

  • (String)


58
59
60
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 58

def opc_sse_customer_algorithm
  @opc_sse_customer_algorithm
end

#opc_sse_customer_keyString

The base64-encoded 256-bit encryption key to use

Returns:

  • (String)


62
63
64
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 62

def opc_sse_customer_key
  @opc_sse_customer_key
end

#opc_sse_customer_key_sha256String

The base64-encoded SHA256 hash of the encryption key

Returns:

  • (String)


66
67
68
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 66

def opc_sse_customer_key_sha256
  @opc_sse_customer_key_sha256
end

#opc_sse_kms_key_idString

The OCID of a master encryption key

Returns:

  • (String)


70
71
72
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 70

def opc_sse_kms_key_id
  @opc_sse_kms_key_id
end

#storage_tierString

The storage tier that the object should be stored in

Returns:

  • (String)


74
75
76
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 74

def storage_tier
  @storage_tier
end

Class Method Details

.attribute_mapObject

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



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 77

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'type',
    'namespace': :'namespace',
    'bucket_name': :'bucketName',
    'object_name': :'objectName',
    'content_type': :'contentType',
    'content_disposition': :'contentDisposition',
    'content_encoding': :'contentEncoding',
    'cache_control': :'cacheControl',
    'content_language': :'contentLanguage',
    'opc_meta': :'opcMeta',
    'opc_sse_customer_algorithm': :'opcSseCustomerAlgorithm',
    'opc_sse_customer_key': :'opcSseCustomerKey',
    'opc_sse_customer_key_sha256': :'opcSseCustomerKeySha256',
    'opc_sse_kms_key_id': :'opcSseKmsKeyId',
    'storage_tier': :'storageTier'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 100

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'type': :'String',
    'namespace': :'String',
    'bucket_name': :'String',
    'object_name': :'String',
    'content_type': :'String',
    'content_disposition': :'String',
    'content_encoding': :'String',
    'cache_control': :'String',
    'content_language': :'String',
    'opc_meta': :'Hash<String, String>',
    'opc_sse_customer_algorithm': :'String',
    'opc_sse_customer_key': :'String',
    'opc_sse_customer_key_sha256': :'String',
    'opc_sse_kms_key_id': :'String',
    'storage_tier': :'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



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 253

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

  self.class == other.class &&
    type == other.type &&
    namespace == other.namespace &&
    bucket_name == other.bucket_name &&
    object_name == other.object_name &&
    content_type == other.content_type &&
    content_disposition == other.content_disposition &&
    content_encoding == other.content_encoding &&
    cache_control == other.cache_control &&
    content_language == other.content_language &&
    opc_meta == other.opc_meta &&
    opc_sse_customer_algorithm == other.opc_sse_customer_algorithm &&
    opc_sse_customer_key == other.opc_sse_customer_key &&
    opc_sse_customer_key_sha256 == other.opc_sse_customer_key_sha256 &&
    opc_sse_kms_key_id == other.opc_sse_kms_key_id &&
    storage_tier == other.storage_tier
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



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

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


277
278
279
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 277

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



286
287
288
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 286

def hash
  [type, namespace, bucket_name, object_name, content_type, content_disposition, content_encoding, cache_control, content_language, opc_meta, opc_sse_customer_algorithm, opc_sse_customer_key, opc_sse_customer_key_sha256, opc_sse_kms_key_id, storage_tier].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



330
331
332
333
334
335
336
337
338
339
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 330

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



324
325
326
# File 'lib/oci/database_tools_runtime/models/execute_sql_output_disposition_object_storage_details.rb', line 324

def to_s
  to_hash.to_s
end