Sha256: e8db435313eaef2196f5330f876f722a561ee11d365105e61b08922293b64225
Contents?: true
Size: 1.62 KB
Versions: 10
Compression:
Stored size: 1.62 KB
Contents
# frozen_string_literal: true module Files class FileMigration attr_reader :options, :attributes def initialize(attributes = {}, options = {}) @attributes = attributes || {} @options = options || {} end # int64 - File migration ID def id @attributes[:id] end # string - Source path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. def path @attributes[:path] end # string - Destination path def dest_path @attributes[:dest_path] end # int64 - Number of files processed def files_moved @attributes[:files_moved] end # int64 - Total number of files to process def files_total @attributes[:files_total] end # string - The type of operation def operation @attributes[:operation] end # string - Region def region @attributes[:region] end # string - Status def status @attributes[:status] end # Parameters: # id (required) - int64 - File Migration ID. def self.find(id, params = {}, options = {}) params ||= {} params[:id] = id raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer) raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id) response, options = Api.send_request("/file_migrations/#{params[:id]}", :get, params, options) FileMigration.new(response.data, options) end def self.get(id, params = {}, options = {}) find(id, params, options) end end end
Version data entries
10 entries across 10 versions & 1 rubygems