Class: OCI::DatabaseManagement::Models::CreateTablespaceDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_management/models/create_tablespace_details.rb

Overview

The details required to create a tablespace.

Constant Summary collapse

TYPE_ENUM =
[
  TYPE_PERMANENT = 'PERMANENT'.freeze,
  TYPE_TEMPORARY = 'TEMPORARY'.freeze
].freeze
DEFAULT_COMPRESS_ENUM =
[
  DEFAULT_COMPRESS_NO_COMPRESS = 'NO_COMPRESS'.freeze,
  DEFAULT_COMPRESS_BASIC_COMPRESS = 'BASIC_COMPRESS'.freeze
].freeze
STATUS_ENUM =
[
  STATUS_READ_ONLY = 'READ_ONLY'.freeze,
  STATUS_READ_WRITE = 'READ_WRITE'.freeze
].freeze
EXTENT_MANAGEMENT_ENUM =
[
  EXTENT_MANAGEMENT_AUTOALLOCATE = 'AUTOALLOCATE'.freeze,
  EXTENT_MANAGEMENT_UNIFORM = 'UNIFORM'.freeze
].freeze
SEGMENT_MANAGEMENT_ENUM =
[
  SEGMENT_MANAGEMENT_AUTO = 'AUTO'.freeze,
  SEGMENT_MANAGEMENT_MANUAL = 'MANUAL'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateTablespaceDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 227

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

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

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

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

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

  self.is_bigfile = attributes[:'isBigfile'] unless attributes[:'isBigfile'].nil?

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

  self.is_bigfile = attributes[:'is_bigfile'] unless attributes[:'is_bigfile'].nil?

  self.data_files = attributes[:'dataFiles'] if attributes[:'dataFiles']

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

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

  self.file_count = attributes[:'fileCount'] if attributes[:'fileCount']

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

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

  self.file_size = attributes[:'fileSize'] if attributes[:'fileSize']

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

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

  self.is_reusable = attributes[:'isReusable'] unless attributes[:'isReusable'].nil?

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

  self.is_reusable = attributes[:'is_reusable'] unless attributes[:'is_reusable'].nil?

  self.is_auto_extensible = attributes[:'isAutoExtensible'] unless attributes[:'isAutoExtensible'].nil?

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

  self.is_auto_extensible = attributes[:'is_auto_extensible'] unless attributes[:'is_auto_extensible'].nil?

  self.auto_extend_next_size = attributes[:'autoExtendNextSize'] if attributes[:'autoExtendNextSize']

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

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

  self.auto_extend_max_size = attributes[:'autoExtendMaxSize'] if attributes[:'autoExtendMaxSize']

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

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

  self.is_max_size_unlimited = attributes[:'isMaxSizeUnlimited'] unless attributes[:'isMaxSizeUnlimited'].nil?

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

  self.is_max_size_unlimited = attributes[:'is_max_size_unlimited'] unless attributes[:'is_max_size_unlimited'].nil?

  self.block_size_in_kilobytes = attributes[:'blockSizeInKilobytes'] if attributes[:'blockSizeInKilobytes']

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

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

  self.is_encrypted = attributes[:'isEncrypted'] unless attributes[:'isEncrypted'].nil?

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

  self.is_encrypted = attributes[:'is_encrypted'] unless attributes[:'is_encrypted'].nil?

  self.encryption_algorithm = attributes[:'encryptionAlgorithm'] if attributes[:'encryptionAlgorithm']

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

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

  self.default_compress = attributes[:'defaultCompress'] if attributes[:'defaultCompress']

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

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

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

  self.extent_management = attributes[:'extentManagement'] if attributes[:'extentManagement']

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

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

  self.extent_uniform_size = attributes[:'extentUniformSize'] if attributes[:'extentUniformSize']

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

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

  self.segment_management = attributes[:'segmentManagement'] if attributes[:'segmentManagement']

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

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

  self.is_default = attributes[:'isDefault'] unless attributes[:'isDefault'].nil?

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

  self.is_default = attributes[:'is_default'] unless attributes[:'is_default'].nil?
end

Instance Attribute Details

#auto_extend_max_sizeOCI::DatabaseManagement::Models::TablespaceStorageSize

The maximum disk space allowed for automatic extension of the data files or temp files.



91
92
93
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 91

def auto_extend_max_size
  @auto_extend_max_size
end

#auto_extend_next_sizeOCI::DatabaseManagement::Models::TablespaceStorageSize

The size of the next increment of disk space to be allocated automatically when more extents are required.



86
87
88
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 86

def auto_extend_next_size
  @auto_extend_next_size
end

#block_size_in_kilobytesInteger

Block size for the tablespace.

Returns:

  • (Integer)


101
102
103
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 101

def block_size_in_kilobytes
  @block_size_in_kilobytes
end

#credential_detailsOCI::DatabaseManagement::Models::TablespaceAdminCredentialDetails

This attribute is required.



39
40
41
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 39

def credential_details
  @credential_details
end

#data_filesArray<String>

The list of data files or temp files created for the tablespace.

Returns:

  • (Array<String>)


61
62
63
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 61

def data_files
  @data_files
end

#default_compressString

The default compression of data for all tables created in the tablespace.

Returns:

  • (String)


115
116
117
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 115

def default_compress
  @default_compress
end

#encryption_algorithmString

The name of the encryption algorithm to be used for tablespace encryption.

Returns:

  • (String)


110
111
112
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 110

def encryption_algorithm
  @encryption_algorithm
end

#extent_managementString

Specifies how the extents of the tablespace should be managed.

Returns:

  • (String)


125
126
127
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 125

def extent_management
  @extent_management
end

#extent_uniform_sizeOCI::DatabaseManagement::Models::TablespaceStorageSize

The size of the extent when the tablespace is managed with uniform extents of a specific size.



130
131
132
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 130

def extent_uniform_size
  @extent_uniform_size
end

#file_countInteger

The number of data files or temp files created for the tablespace. This is for Oracle Managed Files only.

Returns:

  • (Integer)


66
67
68
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 66

def file_count
  @file_count
end

#file_sizeOCI::DatabaseManagement::Models::TablespaceStorageSize

The size of each data file or temp file.



71
72
73
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 71

def file_size
  @file_size
end

#is_auto_extensibleBOOLEAN

Specifies whether the data file or temp file can be extended automatically.

Returns:

  • (BOOLEAN)


81
82
83
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 81

def is_auto_extensible
  @is_auto_extensible
end

#is_bigfileBOOLEAN

Specifies whether the tablespace is a bigfile or smallfile tablespace. A bigfile tablespace contains only one data file or temp file, which can contain up to approximately 4 billion (232) blocks. A smallfile tablespace is a traditional Oracle tablespace, which can contain 1022 data files or temp files, each of which can contain up to approximately 4 million (222) blocks.

Returns:

  • (BOOLEAN)


56
57
58
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 56

def is_bigfile
  @is_bigfile
end

#is_defaultBOOLEAN

Specifies whether the tablespace is the default tablespace.

Returns:

  • (BOOLEAN)


140
141
142
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 140

def is_default
  @is_default
end

#is_encryptedBOOLEAN

Indicates whether the tablespace is encrypted.

Returns:

  • (BOOLEAN)


105
106
107
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 105

def is_encrypted
  @is_encrypted
end

#is_max_size_unlimitedBOOLEAN

Specifies whether the disk space of the data file or temp file can be limited.

Returns:

  • (BOOLEAN)


96
97
98
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 96

def is_max_size_unlimited
  @is_max_size_unlimited
end

#is_reusableBOOLEAN

Specifies whether Oracle can reuse the data file or temp file. Reuse is only allowed when the file name is provided.

Returns:

  • (BOOLEAN)


76
77
78
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 76

def is_reusable
  @is_reusable
end

#nameString

[Required] The name of the tablespace. It must be unique within a database.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 44

def name
  @name
end

#segment_managementString

Specifies whether tablespace segment management should be automatic or manual.

Returns:

  • (String)


135
136
137
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 135

def segment_management
  @segment_management
end

#statusString

The status of the tablespace.

Returns:

  • (String)


120
121
122
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 120

def status
  @status
end

#typeString

The type of tablespace.

Returns:

  • (String)


49
50
51
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 49

def type
  @type
end

Class Method Details

.attribute_mapObject

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



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
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 143

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'credential_details': :'credentialDetails',
    'name': :'name',
    'type': :'type',
    'is_bigfile': :'isBigfile',
    'data_files': :'dataFiles',
    'file_count': :'fileCount',
    'file_size': :'fileSize',
    'is_reusable': :'isReusable',
    'is_auto_extensible': :'isAutoExtensible',
    'auto_extend_next_size': :'autoExtendNextSize',
    'auto_extend_max_size': :'autoExtendMaxSize',
    'is_max_size_unlimited': :'isMaxSizeUnlimited',
    'block_size_in_kilobytes': :'blockSizeInKilobytes',
    'is_encrypted': :'isEncrypted',
    'encryption_algorithm': :'encryptionAlgorithm',
    'default_compress': :'defaultCompress',
    'status': :'status',
    'extent_management': :'extentManagement',
    'extent_uniform_size': :'extentUniformSize',
    'segment_management': :'segmentManagement',
    'is_default': :'isDefault'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 172

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'credential_details': :'OCI::DatabaseManagement::Models::TablespaceAdminCredentialDetails',
    'name': :'String',
    'type': :'String',
    'is_bigfile': :'BOOLEAN',
    'data_files': :'Array<String>',
    'file_count': :'Integer',
    'file_size': :'OCI::DatabaseManagement::Models::TablespaceStorageSize',
    'is_reusable': :'BOOLEAN',
    'is_auto_extensible': :'BOOLEAN',
    'auto_extend_next_size': :'OCI::DatabaseManagement::Models::TablespaceStorageSize',
    'auto_extend_max_size': :'OCI::DatabaseManagement::Models::TablespaceStorageSize',
    'is_max_size_unlimited': :'BOOLEAN',
    'block_size_in_kilobytes': :'Integer',
    'is_encrypted': :'BOOLEAN',
    'encryption_algorithm': :'String',
    'default_compress': :'String',
    'status': :'String',
    'extent_management': :'String',
    'extent_uniform_size': :'OCI::DatabaseManagement::Models::TablespaceStorageSize',
    'segment_management': :'String',
    'is_default': :'BOOLEAN'
    # 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



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 395

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

  self.class == other.class &&
    credential_details == other.credential_details &&
    name == other.name &&
    type == other.type &&
    is_bigfile == other.is_bigfile &&
    data_files == other.data_files &&
    file_count == other.file_count &&
    file_size == other.file_size &&
    is_reusable == other.is_reusable &&
    is_auto_extensible == other.is_auto_extensible &&
    auto_extend_next_size == other.auto_extend_next_size &&
    auto_extend_max_size == other.auto_extend_max_size &&
    is_max_size_unlimited == other.is_max_size_unlimited &&
    block_size_in_kilobytes == other.block_size_in_kilobytes &&
    is_encrypted == other.is_encrypted &&
    encryption_algorithm == other.encryption_algorithm &&
    default_compress == other.default_compress &&
    status == other.status &&
    extent_management == other.extent_management &&
    extent_uniform_size == other.extent_uniform_size &&
    segment_management == other.segment_management &&
    is_default == other.is_default
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



445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 445

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


425
426
427
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 425

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



434
435
436
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 434

def hash
  [credential_details, name, type, is_bigfile, data_files, file_count, file_size, is_reusable, is_auto_extensible, auto_extend_next_size, auto_extend_max_size, is_max_size_unlimited, block_size_in_kilobytes, is_encrypted, encryption_algorithm, default_compress, status, extent_management, extent_uniform_size, segment_management, is_default].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



478
479
480
481
482
483
484
485
486
487
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 478

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



472
473
474
# File 'lib/oci/database_management/models/create_tablespace_details.rb', line 472

def to_s
  to_hash.to_s
end