Class: OCI::DatabaseManagement::Models::AddDataFilesDetails

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

Overview

The details required to add data files or temp files to the tablespace.

Constant Summary collapse

FILE_TYPE_ENUM =
[
  FILE_TYPE_DATAFILE = 'DATAFILE'.freeze,
  FILE_TYPE_TEMPFILE = 'TEMPFILE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AddDataFilesDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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

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

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

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

  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?
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.



59
60
61
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 59

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.



54
55
56
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 54

def auto_extend_next_size
  @auto_extend_next_size
end

#credential_detailsOCI::DatabaseManagement::Models::TablespaceAdminCredentialDetails

This attribute is required.



19
20
21
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 19

def credential_details
  @credential_details
end

#data_filesArray<String>

The list of data files or temp files added to the tablespace.

Returns:

  • (Array<String>)


29
30
31
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 29

def data_files
  @data_files
end

#file_countInteger

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

Returns:

  • (Integer)


34
35
36
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 34

def file_count
  @file_count
end

#file_sizeOCI::DatabaseManagement::Models::TablespaceStorageSize

The size of each data file or temp file.



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

def file_size
  @file_size
end

#file_typeString

[Required] Specifies whether the file is a data file or temp file.

Returns:

  • (String)


24
25
26
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 24

def file_type
  @file_type
end

#is_auto_extensibleBOOLEAN

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

Returns:

  • (BOOLEAN)


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

def is_auto_extensible
  @is_auto_extensible
end

#is_max_size_unlimitedBOOLEAN

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

Returns:

  • (BOOLEAN)


64
65
66
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 64

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)


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

def is_reusable
  @is_reusable
end

Class Method Details

.attribute_mapObject

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



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 67

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'credential_details': :'credentialDetails',
    'file_type': :'fileType',
    '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'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 85

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'credential_details': :'OCI::DatabaseManagement::Models::TablespaceAdminCredentialDetails',
    'file_type': :'String',
    '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'
    # 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



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 200

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

  self.class == other.class &&
    credential_details == other.credential_details &&
    file_type == other.file_type &&
    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
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



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 239

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


219
220
221
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 219

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



228
229
230
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 228

def hash
  [credential_details, file_type, data_files, file_count, file_size, is_reusable, is_auto_extensible, auto_extend_next_size, auto_extend_max_size, is_max_size_unlimited].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 272

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



266
267
268
# File 'lib/oci/database_management/models/add_data_files_details.rb', line 266

def to_s
  to_hash.to_s
end