Class: OCI::DataIntegration::Models::CopyObjectRequest

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

Overview

Copy metadata object request.

Constant Summary collapse

COPY_METADATA_OBJECT_REQUEST_STATUS_ENUM =
[
  COPY_METADATA_OBJECT_REQUEST_STATUS_SUCCESSFUL = 'SUCCESSFUL'.freeze,
  COPY_METADATA_OBJECT_REQUEST_STATUS_FAILED = 'FAILED'.freeze,
  COPY_METADATA_OBJECT_REQUEST_STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  COPY_METADATA_OBJECT_REQUEST_STATUS_QUEUED = 'QUEUED'.freeze,
  COPY_METADATA_OBJECT_REQUEST_STATUS_TERMINATING = 'TERMINATING'.freeze,
  COPY_METADATA_OBJECT_REQUEST_STATUS_TERMINATED = 'TERMINATED'.freeze,
  COPY_METADATA_OBJECT_REQUEST_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 = {}) ⇒ CopyObjectRequest

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
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
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 141

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

  self.source_workspace_id = attributes[:'sourceWorkspaceId'] if attributes[:'sourceWorkspaceId']

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

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

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

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

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

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

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

  self. = attributes[:'copy_metadata_object_request_status'] if attributes[:'copy_metadata_object_request_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.created_by_name = attributes[:'createdByName'] if attributes[:'createdByName']

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

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

  self.total_source_object_count = attributes[:'totalSourceObjectCount'] if attributes[:'totalSourceObjectCount']

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

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

  self.total_objects_copied_into_target = attributes[:'totalObjectsCopiedIntoTarget'] if attributes[:'totalObjectsCopiedIntoTarget']

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

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

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

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

  self.copied_items = attributes[:'copied_items'] if attributes[:'copied_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

#copied_itemsArray<OCI::DataIntegration::Models::CopyObjectMetadataSummary>

The array of copy object details.



67
68
69
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 67

def copied_items
  @copied_items
end

#copy_conflict_resolutionOCI::DataIntegration::Models::CopyConflictResolution



35
36
37
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 35

def copy_conflict_resolution
  @copy_conflict_resolution
end

#copy_metadata_object_request_statusString

Copy Object request status.

Returns:

  • (String)


39
40
41
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 39

def 
  @copy_metadata_object_request_status
end

#created_byString

OCID of the user who initiated copy request.

Returns:

  • (String)


43
44
45
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 43

def created_by
  @created_by
end

#created_by_nameString

Name of the user who created the copy object request.

Returns:

  • (String)


47
48
49
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 47

def created_by_name
  @created_by_name
end

#keyString

Copy object request key.

Returns:

  • (String)


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

def key
  @key
end

#nameString

Name of the copy object request.

Returns:

  • (String)


75
76
77
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 75

def name
  @name
end

#object_keysArray<String>

The list of the objects to be copied.

Returns:

  • (Array<String>)


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

def object_keys
  @object_keys
end

#referenced_itemsArray<OCI::DataIntegration::Models::CopyObjectMetadataSummary>

The array of copied referenced objects.



71
72
73
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 71

def referenced_items
  @referenced_items
end

#source_workspace_idString

The workspace id of the source from where we need to copy object.

Returns:

  • (String)


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

def source_workspace_id
  @source_workspace_id
end

#time_ended_in_millisInteger

Time at which the request was completely processed.

Returns:

  • (Integer)


63
64
65
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 63

def time_ended_in_millis
  @time_ended_in_millis
end

#time_started_in_millisInteger

Time at which the request started getting processed.

Returns:

  • (Integer)


59
60
61
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 59

def time_started_in_millis
  @time_started_in_millis
end

#total_objects_copied_into_targetInteger

Number of objects copied into the target.

Returns:

  • (Integer)


55
56
57
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 55

def total_objects_copied_into_target
  @total_objects_copied_into_target
end

#total_source_object_countInteger

Number of source objects to be copied.

Returns:

  • (Integer)


51
52
53
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 51

def total_source_object_count
  @total_source_object_count
end

Class Method Details

.attribute_mapObject

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



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

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'key',
    'source_workspace_id': :'sourceWorkspaceId',
    'object_keys': :'objectKeys',
    'copy_conflict_resolution': :'copyConflictResolution',
    'copy_metadata_object_request_status': :'copyMetadataObjectRequestStatus',
    'created_by': :'createdBy',
    'created_by_name': :'createdByName',
    'total_source_object_count': :'totalSourceObjectCount',
    'total_objects_copied_into_target': :'totalObjectsCopiedIntoTarget',
    'time_started_in_millis': :'timeStartedInMillis',
    'time_ended_in_millis': :'timeEndedInMillis',
    'copied_items': :'copiedItems',
    'referenced_items': :'referencedItems',
    'name': :'name'
    # 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
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 100

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'key': :'String',
    'source_workspace_id': :'String',
    'object_keys': :'Array<String>',
    'copy_conflict_resolution': :'OCI::DataIntegration::Models::CopyConflictResolution',
    'copy_metadata_object_request_status': :'String',
    'created_by': :'String',
    'created_by_name': :'String',
    'total_source_object_count': :'Integer',
    'total_objects_copied_into_target': :'Integer',
    'time_started_in_millis': :'Integer',
    'time_ended_in_millis': :'Integer',
    'copied_items': :'Array<OCI::DataIntegration::Models::CopyObjectMetadataSummary>',
    'referenced_items': :'Array<OCI::DataIntegration::Models::CopyObjectMetadataSummary>',
    '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



244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 244

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

  self.class == other.class &&
    key == other.key &&
    source_workspace_id == other.source_workspace_id &&
    object_keys == other.object_keys &&
    copy_conflict_resolution == other.copy_conflict_resolution &&
     == other. &&
    created_by == other.created_by &&
    created_by_name == other.created_by_name &&
    total_source_object_count == other.total_source_object_count &&
    total_objects_copied_into_target == other.total_objects_copied_into_target &&
    time_started_in_millis == other.time_started_in_millis &&
    time_ended_in_millis == other.time_ended_in_millis &&
    copied_items == other.copied_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



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

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


267
268
269
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 267

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



276
277
278
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 276

def hash
  [key, source_workspace_id, object_keys, copy_conflict_resolution, , created_by, created_by_name, total_source_object_count, total_objects_copied_into_target, time_started_in_millis, time_ended_in_millis, copied_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



320
321
322
323
324
325
326
327
328
329
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 320

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



314
315
316
# File 'lib/oci/data_integration/models/copy_object_request.rb', line 314

def to_s
  to_hash.to_s
end