Class: OCI::DataIntegration::Models::ExportRequestSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_integration/models/export_request_summary.rb

Overview

Export metadata object response summary.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_SUCCESSFUL = 'SUCCESSFUL'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  STATUS_TERMINATING = 'TERMINATING'.freeze,
  STATUS_TERMINATED = 'TERMINATED'.freeze,
  STATUS_QUEUED = 'QUEUED'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExportRequestSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
264
265
266
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 170

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

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

  self.object_keys = attributes[:'objectKeys'] if attributes[:'objectKeys']

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

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

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

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

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

  self.object_storage_tenancy_id = attributes[:'objectStorageTenancyId'] if attributes[:'objectStorageTenancyId']

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

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

  self.object_storage_region = attributes[:'objectStorageRegion'] if attributes[:'objectStorageRegion']

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

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

  self.are_references_included = attributes[:'areReferencesIncluded'] unless attributes[:'areReferencesIncluded'].nil?
  self.are_references_included = true if are_references_included.nil? && !attributes.key?(:'areReferencesIncluded') # rubocop:disable Style/StringLiterals

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

  self.are_references_included = attributes[:'are_references_included'] unless attributes[:'are_references_included'].nil?
  self.are_references_included = true if are_references_included.nil? && !attributes.key?(:'areReferencesIncluded') && !attributes.key?(:'are_references_included') # rubocop:disable Style/StringLiterals

  self.is_object_overwrite_enabled = attributes[:'isObjectOverwriteEnabled'] unless attributes[:'isObjectOverwriteEnabled'].nil?

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

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

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

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

  self.created_by = attributes[:'createdBy'] if attributes[:'createdBy']

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

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

  self.total_exported_object_count = attributes[:'totalExportedObjectCount'] if attributes[:'totalExportedObjectCount']

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

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

  self.time_started_in_millis = attributes[:'timeStartedInMillis'] if attributes[:'timeStartedInMillis']

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

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

  self.time_ended_in_millis = attributes[:'timeEndedInMillis'] if attributes[:'timeEndedInMillis']

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

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

  self.error_messages = attributes[:'errorMessages'] if attributes[:'errorMessages']

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

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

  self.exported_items = attributes[:'exportedItems'] if attributes[:'exportedItems']

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

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

  self.referenced_items = attributes[:'referencedItems'] if attributes[:'referencedItems']

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

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

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

Instance Attribute Details

#are_references_includedBOOLEAN

Controls if the references will be exported along with the objects

Returns:

  • (BOOLEAN)


48
49
50
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 48

def are_references_included
  @are_references_included
end

#bucket_nameString

The name of the Object Storage Bucket where the objects will be exported to

Returns:

  • (String)


32
33
34
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 32

def bucket_name
  @bucket_name
end

#created_byString

Name of the user who initiated export request.

Returns:

  • (String)


64
65
66
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 64

def created_by
  @created_by
end

#error_messagesHash<String, String>

Contains key of the error

Returns:

  • (Hash<String, String>)


80
81
82
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 80

def error_messages
  @error_messages
end

#exported_itemsArray<OCI::DataIntegration::Models::ExportObjectMetadataSummary>

The array of exported object details.



84
85
86
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 84

def exported_items
  @exported_items
end

#file_nameString

Name of the exported zip file.

Returns:

  • (String)


36
37
38
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 36

def file_name
  @file_name
end

#filtersArray<String>

Export multiple objects based on filters.

Returns:

  • (Array<String>)


56
57
58
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 56

def filters
  @filters
end

#is_object_overwrite_enabledBOOLEAN

Flag to control whether to overwrite the object if it is already present at the provided object storage location.

Returns:

  • (BOOLEAN)


52
53
54
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 52

def is_object_overwrite_enabled
  @is_object_overwrite_enabled
end

#keyString

Export object request key

Returns:

  • (String)


24
25
26
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 24

def key
  @key
end

#nameString

Name of the export request.

Returns:

  • (String)


92
93
94
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 92

def name
  @name
end

#object_keysArray<String>

The list of the objects to be exported

Returns:

  • (Array<String>)


28
29
30
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 28

def object_keys
  @object_keys
end

#object_storage_regionString

Region of the object storage (if using object storage of different region)

Returns:

  • (String)


44
45
46
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 44

def object_storage_region
  @object_storage_region
end

#object_storage_tenancy_idString

Optional parameter to point to object storage tenancy (if using Object Storage of different tenancy)

Returns:

  • (String)


40
41
42
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 40

def object_storage_tenancy_id
  @object_storage_tenancy_id
end

#referenced_itemsString

The array of exported referenced objects.

Returns:

  • (String)


88
89
90
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 88

def referenced_items
  @referenced_items
end

#statusString

Export Objects request status.

Returns:

  • (String)


60
61
62
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 60

def status
  @status
end

#time_ended_in_millisInteger

Time at which the request was completely processed.

Returns:

  • (Integer)


76
77
78
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 76

def time_ended_in_millis
  @time_ended_in_millis
end

#time_started_in_millisInteger

Time at which the request started getting processed.

Returns:

  • (Integer)


72
73
74
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 72

def time_started_in_millis
  @time_started_in_millis
end

#total_exported_object_countInteger

Number of objects that are exported.

Returns:

  • (Integer)


68
69
70
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 68

def total_exported_object_count
  @total_exported_object_count
end

Class Method Details

.attribute_mapObject

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



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 95

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'object_keys': :'objectKeys',
    'bucket_name': :'bucketName',
    'file_name': :'fileName',
    'object_storage_tenancy_id': :'objectStorageTenancyId',
    'object_storage_region': :'objectStorageRegion',
    'are_references_included': :'areReferencesIncluded',
    'is_object_overwrite_enabled': :'isObjectOverwriteEnabled',
    'filters': :'filters',
    'status': :'status',
    'created_by': :'createdBy',
    'total_exported_object_count': :'totalExportedObjectCount',
    'time_started_in_millis': :'timeStartedInMillis',
    'time_ended_in_millis': :'timeEndedInMillis',
    'error_messages': :'errorMessages',
    'exported_items': :'exportedItems',
    'referenced_items': :'referencedItems',
    'name': :'name'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 121

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'object_keys': :'Array<String>',
    'bucket_name': :'String',
    'file_name': :'String',
    'object_storage_tenancy_id': :'String',
    'object_storage_region': :'String',
    'are_references_included': :'BOOLEAN',
    'is_object_overwrite_enabled': :'BOOLEAN',
    'filters': :'Array<String>',
    'status': :'String',
    'created_by': :'String',
    'total_exported_object_count': :'Integer',
    'time_started_in_millis': :'Integer',
    'time_ended_in_millis': :'Integer',
    'error_messages': :'Hash<String, String>',
    'exported_items': :'Array<OCI::DataIntegration::Models::ExportObjectMetadataSummary>',
    'referenced_items': :'String',
    'name': :'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



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 288

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

  self.class == other.class &&
    key == other.key &&
    object_keys == other.object_keys &&
    bucket_name == other.bucket_name &&
    file_name == other.file_name &&
    object_storage_tenancy_id == other.object_storage_tenancy_id &&
    object_storage_region == other.object_storage_region &&
    are_references_included == other.are_references_included &&
    is_object_overwrite_enabled == other.is_object_overwrite_enabled &&
    filters == other.filters &&
    status == other.status &&
    created_by == other.created_by &&
    total_exported_object_count == other.total_exported_object_count &&
    time_started_in_millis == other.time_started_in_millis &&
    time_ended_in_millis == other.time_ended_in_millis &&
    error_messages == other.error_messages &&
    exported_items == other.exported_items &&
    referenced_items == other.referenced_items &&
    name == other.name
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



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 335

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


315
316
317
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 315

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



324
325
326
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 324

def hash
  [key, object_keys, bucket_name, file_name, object_storage_tenancy_id, object_storage_region, are_references_included, is_object_overwrite_enabled, filters, status, created_by, total_exported_object_count, time_started_in_millis, time_ended_in_millis, error_messages, exported_items, referenced_items, name].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



368
369
370
371
372
373
374
375
376
377
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 368

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



362
363
364
# File 'lib/oci/data_integration/models/export_request_summary.rb', line 362

def to_s
  to_hash.to_s
end