Class: AsposeEmailCloud::MoveFileRequest
- Inherits:
-
EmailRequest
- Object
- EmailRequest
- AsposeEmailCloud::MoveFileRequest
- Defined in:
- lib/aspose-email-cloud/models/move_file_request.rb
Overview
Request model for move_file operation.
Instance Attribute Summary collapse
-
#dest_path ⇒ String
Destination file path e.g.
-
#dest_storage_name ⇒ String
Destination storage name.
-
#src_path ⇒ String
Source file path e.g.
-
#src_storage_name ⇒ String
Source storage name.
-
#version_id ⇒ String
File version ID to move.
Instance Method Summary collapse
-
#initialize(src_path:, dest_path:, src_storage_name: nil, dest_storage_name: nil, version_id: nil) ⇒ MoveFileRequest
constructor
Move file.
- #to_http_info(api_client) ⇒ Object
Methods inherited from EmailRequest
select_header_accept, select_header_content_type
Constructor Details
#initialize(src_path:, dest_path:, src_storage_name: nil, dest_storage_name: nil, version_id: nil) ⇒ MoveFileRequest
Move file
54 55 56 57 58 59 60 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 54 def initialize(src_path:, dest_path:, src_storage_name: nil, dest_storage_name: nil, version_id: nil) self.src_path = src_path if src_path self.dest_path = dest_path if dest_path self.src_storage_name = src_storage_name if src_storage_name self.dest_storage_name = dest_storage_name if dest_storage_name self.version_id = version_id if version_id end |
Instance Attribute Details
#dest_path ⇒ String
Destination file path e.g. '/dest.ext'
37 38 39 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 37 def dest_path @dest_path end |
#dest_storage_name ⇒ String
Destination storage name
43 44 45 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 43 def dest_storage_name @dest_storage_name end |
#src_path ⇒ String
Source file path e.g. '/src.ext'
34 35 36 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 34 def src_path @src_path end |
#src_storage_name ⇒ String
Source storage name
40 41 42 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 40 def src_storage_name @src_storage_name end |
#version_id ⇒ String
File version ID to move
46 47 48 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 46 def version_id @version_id end |
Instance Method Details
#to_http_info(api_client) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/aspose-email-cloud/models/move_file_request.rb', line 62 def to_http_info(api_client) # verify the required parameter 'src_path' is set if api_client.config.client_side_validation && self.src_path.nil? raise ArgumentError, "Missing the required parameter 'src_path' when calling FileApi.move_file" end # verify the required parameter 'dest_path' is set if api_client.config.client_side_validation && self.dest_path.nil? raise ArgumentError, "Missing the required parameter 'dest_path' when calling FileApi.move_file" end # resource path local_var_path = '/email/storage/file/move/{srcPath}'.sub('{' + 'srcPath' + '}', self.src_path.to_s) # query parameters query_params = {} query_params[:destPath] = self.dest_path query_params[:srcStorageName] = self.src_storage_name unless self.src_storage_name.nil? query_params[:destStorageName] = self.dest_storage_name unless self.dest_storage_name.nil? query_params[:versionId] = self.version_id unless self.version_id.nil? # form parameters form_params = {} # http body (model) auth_names = ['JWT'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = EmailRequest.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : EmailRequest.select_header_content_type(['application/json']) AsposeEmailCloud::HttpRequest.new(resource_path: local_var_path, header_params: header_params, query_params: query_params, form_params: form_params, auth_names: auth_names) end |