Class: Ecoportal::API::V2::S3::Files::BatchUpload::FileResult

Inherits:
Struct
  • Object
show all
Defined in:
lib/ecoportal/api/v2/s3/files/batch_upload.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorObject

Returns the value of attribute error.



17
18
19
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 17

def error
  @error
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



16
17
18
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 16

def file
  @file
end

#pollObject

Returns the value of attribute poll.



17
18
19
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 17

def poll
  @poll
end

#s3_file_referenceObject

Returns the value of attribute s3_file_reference.



17
18
19
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 17

def s3_file_reference
  @s3_file_reference
end

Instance Method Details

#container_idObject



27
28
29
30
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 27

def container_id
  return unless success?
  poll.container_id
end

#error?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 19

def error?
  !error.nil?
end

#success?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/ecoportal/api/v2/s3/files/batch_upload.rb', line 23

def success?
  poll&.success?
end