Class: AsposeEmailCloud::MoveFolderRequest

Inherits:
EmailRequest show all
Defined in:
lib/aspose-email-cloud/models/move_folder_request.rb

Overview

Request model for move_folder operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ MoveFolderRequest

Move folder

Parameters:

  • src_path (String)

    Folder path to move e.g. '/folder'

  • dest_path (String)

    Destination folder path to move to e.g '/dst'

  • src_storage_name (String) (defaults to: nil)

    Source storage name

  • dest_storage_name (String) (defaults to: nil)

    Destination storage name



50
51
52
53
54
55
# File 'lib/aspose-email-cloud/models/move_folder_request.rb', line 50

def initialize(src_path:, dest_path:, src_storage_name: nil, dest_storage_name: 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
end

Instance Attribute Details

#dest_pathString

Destination folder path to move to e.g '/dst'

Returns:

  • (String)


37
38
39
# File 'lib/aspose-email-cloud/models/move_folder_request.rb', line 37

def dest_path
  @dest_path
end

#dest_storage_nameString

Destination storage name

Returns:

  • (String)


43
44
45
# File 'lib/aspose-email-cloud/models/move_folder_request.rb', line 43

def dest_storage_name
  @dest_storage_name
end

#src_pathString

Folder path to move e.g. '/folder'

Returns:

  • (String)


34
35
36
# File 'lib/aspose-email-cloud/models/move_folder_request.rb', line 34

def src_path
  @src_path
end

#src_storage_nameString

Source storage name

Returns:

  • (String)


40
41
42
# File 'lib/aspose-email-cloud/models/move_folder_request.rb', line 40

def src_storage_name
  @src_storage_name
end

Instance Method Details

#to_http_info(api_client) ⇒ Object



57
58
59
60
61
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
# File 'lib/aspose-email-cloud/models/move_folder_request.rb', line 57

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 FolderApi.move_folder"
  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 FolderApi.move_folder"
  end
  # resource path
  local_var_path = '/email/storage/folder/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?

  # 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