nightona_api_client 0.191.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +212 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +31 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Rakefile +10 -0
- data/fix-gemspec.sh +11 -0
- data/lib/nightona_api_client/api/admin_api.rb +1449 -0
- data/lib/nightona_api_client/api/api_keys_api.rb +401 -0
- data/lib/nightona_api_client/api/audit_api.rb +110 -0
- data/lib/nightona_api_client/api/config_api.rb +77 -0
- data/lib/nightona_api_client/api/docker_registry_api.rb +411 -0
- data/lib/nightona_api_client/api/health_api.rb +126 -0
- data/lib/nightona_api_client/api/jobs_api.rb +299 -0
- data/lib/nightona_api_client/api/object_storage_api.rb +80 -0
- data/lib/nightona_api_client/api/organizations_api.rb +2615 -0
- data/lib/nightona_api_client/api/preview_api.rb +278 -0
- data/lib/nightona_api_client/api/regions_api.rb +77 -0
- data/lib/nightona_api_client/api/runners_api.rb +711 -0
- data/lib/nightona_api_client/api/sandbox_api.rb +3064 -0
- data/lib/nightona_api_client/api/snapshots_api.rb +567 -0
- data/lib/nightona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/nightona_api_client/api/users_api.rb +316 -0
- data/lib/nightona_api_client/api/volumes_api.rb +342 -0
- data/lib/nightona_api_client/api/webhooks_api.rb +276 -0
- data/lib/nightona_api_client/api_client.rb +397 -0
- data/lib/nightona_api_client/api_error.rb +58 -0
- data/lib/nightona_api_client/api_model_base.rb +88 -0
- data/lib/nightona_api_client/configuration.rb +309 -0
- data/lib/nightona_api_client/models/account_provider.rb +190 -0
- data/lib/nightona_api_client/models/admin_create_runner.rb +326 -0
- data/lib/nightona_api_client/models/admin_get_webhook_status200_response.rb +147 -0
- data/lib/nightona_api_client/models/announcement.rb +175 -0
- data/lib/nightona_api_client/models/api_key_list.rb +313 -0
- data/lib/nightona_api_client/models/api_key_response.rb +273 -0
- data/lib/nightona_api_client/models/audit_log.rb +369 -0
- data/lib/nightona_api_client/models/build_info.rb +241 -0
- data/lib/nightona_api_client/models/command.rb +202 -0
- data/lib/nightona_api_client/models/completion_context.rb +173 -0
- data/lib/nightona_api_client/models/completion_item.rb +218 -0
- data/lib/nightona_api_client/models/completion_list.rb +192 -0
- data/lib/nightona_api_client/models/compressed_screenshot_response.rb +185 -0
- data/lib/nightona_api_client/models/computer_use_start_response.rb +192 -0
- data/lib/nightona_api_client/models/computer_use_status_response.rb +189 -0
- data/lib/nightona_api_client/models/computer_use_stop_response.rb +192 -0
- data/lib/nightona_api_client/models/create_api_key.rb +217 -0
- data/lib/nightona_api_client/models/create_build_info.rb +177 -0
- data/lib/nightona_api_client/models/create_docker_registry.rb +256 -0
- data/lib/nightona_api_client/models/create_linked_account.rb +192 -0
- data/lib/nightona_api_client/models/create_organization.rb +192 -0
- data/lib/nightona_api_client/models/create_organization_invitation.rb +255 -0
- data/lib/nightona_api_client/models/create_organization_quota.rb +219 -0
- data/lib/nightona_api_client/models/create_organization_region_quota.rb +372 -0
- data/lib/nightona_api_client/models/create_organization_role.rb +233 -0
- data/lib/nightona_api_client/models/create_region.rb +198 -0
- data/lib/nightona_api_client/models/create_region_response.rb +209 -0
- data/lib/nightona_api_client/models/create_runner.rb +202 -0
- data/lib/nightona_api_client/models/create_runner_response.rb +192 -0
- data/lib/nightona_api_client/models/create_sandbox.rb +356 -0
- data/lib/nightona_api_client/models/create_sandbox_snapshot.rb +177 -0
- data/lib/nightona_api_client/models/create_session_request.rb +165 -0
- data/lib/nightona_api_client/models/create_snapshot.rb +291 -0
- data/lib/nightona_api_client/models/create_user.rb +269 -0
- data/lib/nightona_api_client/models/create_volume.rb +164 -0
- data/lib/nightona_api_client/models/display_info_response.rb +167 -0
- data/lib/nightona_api_client/models/docker_registry.rb +378 -0
- data/lib/nightona_api_client/models/download_files.rb +167 -0
- data/lib/nightona_api_client/models/execute_request.rb +184 -0
- data/lib/nightona_api_client/models/execute_response.rb +192 -0
- data/lib/nightona_api_client/models/file_info.rb +346 -0
- data/lib/nightona_api_client/models/file_status.rb +242 -0
- data/lib/nightona_api_client/models/fork_sandbox.rb +148 -0
- data/lib/nightona_api_client/models/git_add_request.rb +193 -0
- data/lib/nightona_api_client/models/git_branch_request.rb +190 -0
- data/lib/nightona_api_client/models/git_checkout_request.rb +190 -0
- data/lib/nightona_api_client/models/git_clone_request.rb +226 -0
- data/lib/nightona_api_client/models/git_commit_info.rb +268 -0
- data/lib/nightona_api_client/models/git_commit_request.rb +254 -0
- data/lib/nightona_api_client/models/git_commit_response.rb +164 -0
- data/lib/nightona_api_client/models/git_delete_branch_request.rb +190 -0
- data/lib/nightona_api_client/models/git_repo_request.rb +182 -0
- data/lib/nightona_api_client/models/git_status.rb +219 -0
- data/lib/nightona_api_client/models/gpu_type.rb +41 -0
- data/lib/nightona_api_client/models/health_controller_check200_response.rb +182 -0
- data/lib/nightona_api_client/models/health_controller_check200_response_info_value.rb +164 -0
- data/lib/nightona_api_client/models/health_controller_check503_response.rb +182 -0
- data/lib/nightona_api_client/models/job.rb +366 -0
- data/lib/nightona_api_client/models/job_status.rb +43 -0
- data/lib/nightona_api_client/models/job_type.rb +54 -0
- data/lib/nightona_api_client/models/keyboard_hotkey_request.rb +165 -0
- data/lib/nightona_api_client/models/keyboard_press_request.rb +177 -0
- data/lib/nightona_api_client/models/keyboard_type_request.rb +175 -0
- data/lib/nightona_api_client/models/list_branch_response.rb +166 -0
- data/lib/nightona_api_client/models/list_sandboxes_response.rb +180 -0
- data/lib/nightona_api_client/models/log_entry.rb +334 -0
- data/lib/nightona_api_client/models/lsp_completion_params.rb +254 -0
- data/lib/nightona_api_client/models/lsp_document_request.rb +219 -0
- data/lib/nightona_api_client/models/lsp_location.rb +190 -0
- data/lib/nightona_api_client/models/lsp_server_request.rb +192 -0
- data/lib/nightona_api_client/models/lsp_symbol.rb +216 -0
- data/lib/nightona_api_client/models/match.rb +216 -0
- data/lib/nightona_api_client/models/metric_data_point.rb +192 -0
- data/lib/nightona_api_client/models/metric_series.rb +194 -0
- data/lib/nightona_api_client/models/metrics_response.rb +167 -0
- data/lib/nightona_api_client/models/mouse_click_request.rb +212 -0
- data/lib/nightona_api_client/models/mouse_click_response.rb +192 -0
- data/lib/nightona_api_client/models/mouse_drag_request.rb +256 -0
- data/lib/nightona_api_client/models/mouse_drag_response.rb +192 -0
- data/lib/nightona_api_client/models/mouse_move_request.rb +192 -0
- data/lib/nightona_api_client/models/mouse_move_response.rb +192 -0
- data/lib/nightona_api_client/models/mouse_position.rb +192 -0
- data/lib/nightona_api_client/models/mouse_scroll_request.rb +229 -0
- data/lib/nightona_api_client/models/mouse_scroll_response.rb +165 -0
- data/lib/nightona_api_client/models/nightona_configuration.rb +507 -0
- data/lib/nightona_api_client/models/oidc_config.rb +219 -0
- data/lib/nightona_api_client/models/organization.rb +698 -0
- data/lib/nightona_api_client/models/organization_invitation.rb +463 -0
- data/lib/nightona_api_client/models/organization_role.rb +341 -0
- data/lib/nightona_api_client/models/organization_sandbox_default_limited_network_egress.rb +165 -0
- data/lib/nightona_api_client/models/organization_suspension.rb +221 -0
- data/lib/nightona_api_client/models/organization_usage_overview.rb +270 -0
- data/lib/nightona_api_client/models/organization_user.rb +380 -0
- data/lib/nightona_api_client/models/otel_config.rb +178 -0
- data/lib/nightona_api_client/models/paginated_audit_logs.rb +254 -0
- data/lib/nightona_api_client/models/paginated_jobs.rb +244 -0
- data/lib/nightona_api_client/models/paginated_logs.rb +248 -0
- data/lib/nightona_api_client/models/paginated_sandboxes_deprecated.rb +244 -0
- data/lib/nightona_api_client/models/paginated_snapshots.rb +244 -0
- data/lib/nightona_api_client/models/paginated_traces.rb +248 -0
- data/lib/nightona_api_client/models/poll_jobs_response.rb +167 -0
- data/lib/nightona_api_client/models/port_preview_url.rb +219 -0
- data/lib/nightona_api_client/models/position.rb +190 -0
- data/lib/nightona_api_client/models/posthog_config.rb +192 -0
- data/lib/nightona_api_client/models/process_errors_response.rb +192 -0
- data/lib/nightona_api_client/models/process_logs_response.rb +192 -0
- data/lib/nightona_api_client/models/process_restart_response.rb +192 -0
- data/lib/nightona_api_client/models/process_status_response.rb +192 -0
- data/lib/nightona_api_client/models/project_dir_response.rb +147 -0
- data/lib/nightona_api_client/models/pty_create_request.rb +217 -0
- data/lib/nightona_api_client/models/pty_create_response.rb +165 -0
- data/lib/nightona_api_client/models/pty_list_response.rb +167 -0
- data/lib/nightona_api_client/models/pty_resize_request.rb +192 -0
- data/lib/nightona_api_client/models/pty_session_info.rb +354 -0
- data/lib/nightona_api_client/models/range.rb +190 -0
- data/lib/nightona_api_client/models/rate_limit_config.rb +178 -0
- data/lib/nightona_api_client/models/rate_limit_entry.rb +158 -0
- data/lib/nightona_api_client/models/regenerate_api_key_response.rb +165 -0
- data/lib/nightona_api_client/models/region.rb +339 -0
- data/lib/nightona_api_client/models/region_quota.rb +437 -0
- data/lib/nightona_api_client/models/region_screenshot_response.rb +185 -0
- data/lib/nightona_api_client/models/region_type.rb +42 -0
- data/lib/nightona_api_client/models/region_usage_overview.rb +515 -0
- data/lib/nightona_api_client/models/registry_push_access_dto.rb +300 -0
- data/lib/nightona_api_client/models/replace_request.rb +218 -0
- data/lib/nightona_api_client/models/replace_result.rb +165 -0
- data/lib/nightona_api_client/models/resize_sandbox.rb +225 -0
- data/lib/nightona_api_client/models/runner.rb +710 -0
- data/lib/nightona_api_client/models/runner_class.rb +40 -0
- data/lib/nightona_api_client/models/runner_full.rb +747 -0
- data/lib/nightona_api_client/models/runner_health_metrics.rb +482 -0
- data/lib/nightona_api_client/models/runner_healthcheck.rb +217 -0
- data/lib/nightona_api_client/models/runner_service_health.rb +202 -0
- data/lib/nightona_api_client/models/runner_snapshot_dto.rb +202 -0
- data/lib/nightona_api_client/models/runner_state.rb +44 -0
- data/lib/nightona_api_client/models/sandbox.rb +788 -0
- data/lib/nightona_api_client/models/sandbox_class.rb +43 -0
- data/lib/nightona_api_client/models/sandbox_desired_state.rb +45 -0
- data/lib/nightona_api_client/models/sandbox_labels.rb +167 -0
- data/lib/nightona_api_client/models/sandbox_list_item.rb +658 -0
- data/lib/nightona_api_client/models/sandbox_list_sort_direction.rb +41 -0
- data/lib/nightona_api_client/models/sandbox_list_sort_field.rb +45 -0
- data/lib/nightona_api_client/models/sandbox_state.rb +61 -0
- data/lib/nightona_api_client/models/sandbox_volume.rb +202 -0
- data/lib/nightona_api_client/models/screenshot_response.rb +185 -0
- data/lib/nightona_api_client/models/search_files_response.rb +166 -0
- data/lib/nightona_api_client/models/send_webhook_dto.rb +224 -0
- data/lib/nightona_api_client/models/session.rb +180 -0
- data/lib/nightona_api_client/models/session_execute_request.rb +185 -0
- data/lib/nightona_api_client/models/session_execute_response.rb +168 -0
- data/lib/nightona_api_client/models/set_snapshot_general_status_dto.rb +165 -0
- data/lib/nightona_api_client/models/signed_port_preview_url.rb +246 -0
- data/lib/nightona_api_client/models/snapshot_dto.rb +562 -0
- data/lib/nightona_api_client/models/snapshot_manager_credentials.rb +192 -0
- data/lib/nightona_api_client/models/snapshot_state.rb +47 -0
- data/lib/nightona_api_client/models/ssh_access_dto.rb +327 -0
- data/lib/nightona_api_client/models/ssh_access_validation_dto.rb +192 -0
- data/lib/nightona_api_client/models/storage_access_dto.rb +300 -0
- data/lib/nightona_api_client/models/toolbox_proxy_url.rb +165 -0
- data/lib/nightona_api_client/models/trace_span.rb +332 -0
- data/lib/nightona_api_client/models/trace_summary.rb +310 -0
- data/lib/nightona_api_client/models/update_docker_registry.rb +239 -0
- data/lib/nightona_api_client/models/update_job_status.rb +207 -0
- data/lib/nightona_api_client/models/update_organization_default_region.rb +165 -0
- data/lib/nightona_api_client/models/update_organization_invitation.rb +228 -0
- data/lib/nightona_api_client/models/update_organization_member_access.rb +218 -0
- data/lib/nightona_api_client/models/update_organization_quota.rb +295 -0
- data/lib/nightona_api_client/models/update_organization_region_quota.rb +299 -0
- data/lib/nightona_api_client/models/update_organization_role.rb +233 -0
- data/lib/nightona_api_client/models/update_region.rb +171 -0
- data/lib/nightona_api_client/models/update_sandbox_network_settings.rb +168 -0
- data/lib/nightona_api_client/models/update_sandbox_state_dto.rb +209 -0
- data/lib/nightona_api_client/models/url.rb +165 -0
- data/lib/nightona_api_client/models/user.rb +275 -0
- data/lib/nightona_api_client/models/user_home_dir_response.rb +147 -0
- data/lib/nightona_api_client/models/user_public_key.rb +192 -0
- data/lib/nightona_api_client/models/volume_dto.rb +346 -0
- data/lib/nightona_api_client/models/volume_state.rb +46 -0
- data/lib/nightona_api_client/models/webhook_app_portal_access.rb +192 -0
- data/lib/nightona_api_client/models/webhook_event.rb +46 -0
- data/lib/nightona_api_client/models/webhook_initialization_status.rb +272 -0
- data/lib/nightona_api_client/models/windows_response.rb +194 -0
- data/lib/nightona_api_client/models/work_dir_response.rb +147 -0
- data/lib/nightona_api_client/version.rb +15 -0
- data/lib/nightona_api_client.rb +241 -0
- data/nightona_api_client.gemspec +39 -0
- data/project.json +68 -0
- metadata +299 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona
|
|
3
|
+
|
|
4
|
+
#Nightona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: amaraaamka0404@gmail.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module NightonaApiClient
|
|
16
|
+
class UsersApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Enroll in SMS MFA
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [String]
|
|
25
|
+
def enroll_in_sms_mfa(opts = {})
|
|
26
|
+
data, _status_code, _headers = enroll_in_sms_mfa_with_http_info(opts)
|
|
27
|
+
data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Enroll in SMS MFA
|
|
31
|
+
# @param [Hash] opts the optional parameters
|
|
32
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
33
|
+
def enroll_in_sms_mfa_with_http_info(opts = {})
|
|
34
|
+
if @api_client.config.debugging
|
|
35
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.enroll_in_sms_mfa ...'
|
|
36
|
+
end
|
|
37
|
+
# resource path
|
|
38
|
+
local_var_path = '/users/mfa/sms/enroll'
|
|
39
|
+
|
|
40
|
+
# query parameters
|
|
41
|
+
query_params = opts[:query_params] || {}
|
|
42
|
+
|
|
43
|
+
# header parameters
|
|
44
|
+
header_params = opts[:header_params] || {}
|
|
45
|
+
# HTTP header 'Accept' (if needed)
|
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
47
|
+
|
|
48
|
+
# form parameters
|
|
49
|
+
form_params = opts[:form_params] || {}
|
|
50
|
+
|
|
51
|
+
# http body (model)
|
|
52
|
+
post_body = opts[:debug_body]
|
|
53
|
+
|
|
54
|
+
# return_type
|
|
55
|
+
return_type = opts[:debug_return_type] || 'String'
|
|
56
|
+
|
|
57
|
+
# auth_names
|
|
58
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
59
|
+
|
|
60
|
+
new_options = opts.merge(
|
|
61
|
+
:operation => :"UsersApi.enroll_in_sms_mfa",
|
|
62
|
+
:header_params => header_params,
|
|
63
|
+
:query_params => query_params,
|
|
64
|
+
:form_params => form_params,
|
|
65
|
+
:body => post_body,
|
|
66
|
+
:auth_names => auth_names,
|
|
67
|
+
:return_type => return_type
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
71
|
+
if @api_client.config.debugging
|
|
72
|
+
@api_client.config.logger.debug "API called: UsersApi#enroll_in_sms_mfa\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
73
|
+
end
|
|
74
|
+
return data, status_code, headers
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Get authenticated user
|
|
78
|
+
# @param [Hash] opts the optional parameters
|
|
79
|
+
# @return [User]
|
|
80
|
+
def get_authenticated_user(opts = {})
|
|
81
|
+
data, _status_code, _headers = get_authenticated_user_with_http_info(opts)
|
|
82
|
+
data
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Get authenticated user
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
|
88
|
+
def get_authenticated_user_with_http_info(opts = {})
|
|
89
|
+
if @api_client.config.debugging
|
|
90
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_authenticated_user ...'
|
|
91
|
+
end
|
|
92
|
+
# resource path
|
|
93
|
+
local_var_path = '/users/me'
|
|
94
|
+
|
|
95
|
+
# query parameters
|
|
96
|
+
query_params = opts[:query_params] || {}
|
|
97
|
+
|
|
98
|
+
# header parameters
|
|
99
|
+
header_params = opts[:header_params] || {}
|
|
100
|
+
# HTTP header 'Accept' (if needed)
|
|
101
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
102
|
+
|
|
103
|
+
# form parameters
|
|
104
|
+
form_params = opts[:form_params] || {}
|
|
105
|
+
|
|
106
|
+
# http body (model)
|
|
107
|
+
post_body = opts[:debug_body]
|
|
108
|
+
|
|
109
|
+
# return_type
|
|
110
|
+
return_type = opts[:debug_return_type] || 'User'
|
|
111
|
+
|
|
112
|
+
# auth_names
|
|
113
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
114
|
+
|
|
115
|
+
new_options = opts.merge(
|
|
116
|
+
:operation => :"UsersApi.get_authenticated_user",
|
|
117
|
+
:header_params => header_params,
|
|
118
|
+
:query_params => query_params,
|
|
119
|
+
:form_params => form_params,
|
|
120
|
+
:body => post_body,
|
|
121
|
+
:auth_names => auth_names,
|
|
122
|
+
:return_type => return_type
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
126
|
+
if @api_client.config.debugging
|
|
127
|
+
@api_client.config.logger.debug "API called: UsersApi#get_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
128
|
+
end
|
|
129
|
+
return data, status_code, headers
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Get available account providers
|
|
133
|
+
# @param [Hash] opts the optional parameters
|
|
134
|
+
# @return [Array<AccountProvider>]
|
|
135
|
+
def get_available_account_providers(opts = {})
|
|
136
|
+
data, _status_code, _headers = get_available_account_providers_with_http_info(opts)
|
|
137
|
+
data
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Get available account providers
|
|
141
|
+
# @param [Hash] opts the optional parameters
|
|
142
|
+
# @return [Array<(Array<AccountProvider>, Integer, Hash)>] Array<AccountProvider> data, response status code and response headers
|
|
143
|
+
def get_available_account_providers_with_http_info(opts = {})
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_available_account_providers ...'
|
|
146
|
+
end
|
|
147
|
+
# resource path
|
|
148
|
+
local_var_path = '/users/account-providers'
|
|
149
|
+
|
|
150
|
+
# query parameters
|
|
151
|
+
query_params = opts[:query_params] || {}
|
|
152
|
+
|
|
153
|
+
# header parameters
|
|
154
|
+
header_params = opts[:header_params] || {}
|
|
155
|
+
# HTTP header 'Accept' (if needed)
|
|
156
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
157
|
+
|
|
158
|
+
# form parameters
|
|
159
|
+
form_params = opts[:form_params] || {}
|
|
160
|
+
|
|
161
|
+
# http body (model)
|
|
162
|
+
post_body = opts[:debug_body]
|
|
163
|
+
|
|
164
|
+
# return_type
|
|
165
|
+
return_type = opts[:debug_return_type] || 'Array<AccountProvider>'
|
|
166
|
+
|
|
167
|
+
# auth_names
|
|
168
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
169
|
+
|
|
170
|
+
new_options = opts.merge(
|
|
171
|
+
:operation => :"UsersApi.get_available_account_providers",
|
|
172
|
+
:header_params => header_params,
|
|
173
|
+
:query_params => query_params,
|
|
174
|
+
:form_params => form_params,
|
|
175
|
+
:body => post_body,
|
|
176
|
+
:auth_names => auth_names,
|
|
177
|
+
:return_type => return_type
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
181
|
+
if @api_client.config.debugging
|
|
182
|
+
@api_client.config.logger.debug "API called: UsersApi#get_available_account_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
183
|
+
end
|
|
184
|
+
return data, status_code, headers
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Link account
|
|
188
|
+
# @param create_linked_account [CreateLinkedAccount]
|
|
189
|
+
# @param [Hash] opts the optional parameters
|
|
190
|
+
# @return [nil]
|
|
191
|
+
def link_account(create_linked_account, opts = {})
|
|
192
|
+
link_account_with_http_info(create_linked_account, opts)
|
|
193
|
+
nil
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Link account
|
|
197
|
+
# @param create_linked_account [CreateLinkedAccount]
|
|
198
|
+
# @param [Hash] opts the optional parameters
|
|
199
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
200
|
+
def link_account_with_http_info(create_linked_account, opts = {})
|
|
201
|
+
if @api_client.config.debugging
|
|
202
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.link_account ...'
|
|
203
|
+
end
|
|
204
|
+
# verify the required parameter 'create_linked_account' is set
|
|
205
|
+
if @api_client.config.client_side_validation && create_linked_account.nil?
|
|
206
|
+
fail ArgumentError, "Missing the required parameter 'create_linked_account' when calling UsersApi.link_account"
|
|
207
|
+
end
|
|
208
|
+
# resource path
|
|
209
|
+
local_var_path = '/users/linked-accounts'
|
|
210
|
+
|
|
211
|
+
# query parameters
|
|
212
|
+
query_params = opts[:query_params] || {}
|
|
213
|
+
|
|
214
|
+
# header parameters
|
|
215
|
+
header_params = opts[:header_params] || {}
|
|
216
|
+
# HTTP header 'Content-Type'
|
|
217
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
218
|
+
if !content_type.nil?
|
|
219
|
+
header_params['Content-Type'] = content_type
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# form parameters
|
|
223
|
+
form_params = opts[:form_params] || {}
|
|
224
|
+
|
|
225
|
+
# http body (model)
|
|
226
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_linked_account)
|
|
227
|
+
|
|
228
|
+
# return_type
|
|
229
|
+
return_type = opts[:debug_return_type]
|
|
230
|
+
|
|
231
|
+
# auth_names
|
|
232
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
233
|
+
|
|
234
|
+
new_options = opts.merge(
|
|
235
|
+
:operation => :"UsersApi.link_account",
|
|
236
|
+
:header_params => header_params,
|
|
237
|
+
:query_params => query_params,
|
|
238
|
+
:form_params => form_params,
|
|
239
|
+
:body => post_body,
|
|
240
|
+
:auth_names => auth_names,
|
|
241
|
+
:return_type => return_type
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
245
|
+
if @api_client.config.debugging
|
|
246
|
+
@api_client.config.logger.debug "API called: UsersApi#link_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
247
|
+
end
|
|
248
|
+
return data, status_code, headers
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Unlink account
|
|
252
|
+
# @param provider [String]
|
|
253
|
+
# @param provider_user_id [String]
|
|
254
|
+
# @param [Hash] opts the optional parameters
|
|
255
|
+
# @return [nil]
|
|
256
|
+
def unlink_account(provider, provider_user_id, opts = {})
|
|
257
|
+
unlink_account_with_http_info(provider, provider_user_id, opts)
|
|
258
|
+
nil
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Unlink account
|
|
262
|
+
# @param provider [String]
|
|
263
|
+
# @param provider_user_id [String]
|
|
264
|
+
# @param [Hash] opts the optional parameters
|
|
265
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
266
|
+
def unlink_account_with_http_info(provider, provider_user_id, opts = {})
|
|
267
|
+
if @api_client.config.debugging
|
|
268
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.unlink_account ...'
|
|
269
|
+
end
|
|
270
|
+
# verify the required parameter 'provider' is set
|
|
271
|
+
if @api_client.config.client_side_validation && provider.nil?
|
|
272
|
+
fail ArgumentError, "Missing the required parameter 'provider' when calling UsersApi.unlink_account"
|
|
273
|
+
end
|
|
274
|
+
# verify the required parameter 'provider_user_id' is set
|
|
275
|
+
if @api_client.config.client_side_validation && provider_user_id.nil?
|
|
276
|
+
fail ArgumentError, "Missing the required parameter 'provider_user_id' when calling UsersApi.unlink_account"
|
|
277
|
+
end
|
|
278
|
+
# resource path
|
|
279
|
+
local_var_path = '/users/linked-accounts/{provider}/{providerUserId}'.sub('{' + 'provider' + '}', CGI.escape(provider.to_s)).sub('{' + 'providerUserId' + '}', CGI.escape(provider_user_id.to_s))
|
|
280
|
+
|
|
281
|
+
# query parameters
|
|
282
|
+
query_params = opts[:query_params] || {}
|
|
283
|
+
|
|
284
|
+
# header parameters
|
|
285
|
+
header_params = opts[:header_params] || {}
|
|
286
|
+
|
|
287
|
+
# form parameters
|
|
288
|
+
form_params = opts[:form_params] || {}
|
|
289
|
+
|
|
290
|
+
# http body (model)
|
|
291
|
+
post_body = opts[:debug_body]
|
|
292
|
+
|
|
293
|
+
# return_type
|
|
294
|
+
return_type = opts[:debug_return_type]
|
|
295
|
+
|
|
296
|
+
# auth_names
|
|
297
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
298
|
+
|
|
299
|
+
new_options = opts.merge(
|
|
300
|
+
:operation => :"UsersApi.unlink_account",
|
|
301
|
+
:header_params => header_params,
|
|
302
|
+
:query_params => query_params,
|
|
303
|
+
:form_params => form_params,
|
|
304
|
+
:body => post_body,
|
|
305
|
+
:auth_names => auth_names,
|
|
306
|
+
:return_type => return_type
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
310
|
+
if @api_client.config.debugging
|
|
311
|
+
@api_client.config.logger.debug "API called: UsersApi#unlink_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
312
|
+
end
|
|
313
|
+
return data, status_code, headers
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
end
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona
|
|
3
|
+
|
|
4
|
+
#Nightona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: amaraaamka0404@gmail.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module NightonaApiClient
|
|
16
|
+
class VolumesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a new volume
|
|
23
|
+
# @param create_volume [CreateVolume]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
26
|
+
# @return [VolumeDto]
|
|
27
|
+
def create_volume(create_volume, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_volume_with_http_info(create_volume, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a new volume
|
|
33
|
+
# @param create_volume [CreateVolume]
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
36
|
+
# @return [Array<(VolumeDto, Integer, Hash)>] VolumeDto data, response status code and response headers
|
|
37
|
+
def create_volume_with_http_info(create_volume, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: VolumesApi.create_volume ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_volume' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_volume.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_volume' when calling VolumesApi.create_volume"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/volumes'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_volume)
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || 'VolumeDto'
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"VolumesApi.create_volume",
|
|
76
|
+
:header_params => header_params,
|
|
77
|
+
:query_params => query_params,
|
|
78
|
+
:form_params => form_params,
|
|
79
|
+
:body => post_body,
|
|
80
|
+
:auth_names => auth_names,
|
|
81
|
+
:return_type => return_type
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
85
|
+
if @api_client.config.debugging
|
|
86
|
+
@api_client.config.logger.debug "API called: VolumesApi#create_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Delete volume
|
|
92
|
+
# @param volume_id [String] ID of the volume
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
95
|
+
# @return [nil]
|
|
96
|
+
def delete_volume(volume_id, opts = {})
|
|
97
|
+
delete_volume_with_http_info(volume_id, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete volume
|
|
102
|
+
# @param volume_id [String] ID of the volume
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
105
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
106
|
+
def delete_volume_with_http_info(volume_id, opts = {})
|
|
107
|
+
if @api_client.config.debugging
|
|
108
|
+
@api_client.config.logger.debug 'Calling API: VolumesApi.delete_volume ...'
|
|
109
|
+
end
|
|
110
|
+
# verify the required parameter 'volume_id' is set
|
|
111
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
112
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling VolumesApi.delete_volume"
|
|
113
|
+
end
|
|
114
|
+
# resource path
|
|
115
|
+
local_var_path = '/volumes/{volumeId}'.sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))
|
|
116
|
+
|
|
117
|
+
# query parameters
|
|
118
|
+
query_params = opts[:query_params] || {}
|
|
119
|
+
|
|
120
|
+
# header parameters
|
|
121
|
+
header_params = opts[:header_params] || {}
|
|
122
|
+
header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
|
|
123
|
+
|
|
124
|
+
# form parameters
|
|
125
|
+
form_params = opts[:form_params] || {}
|
|
126
|
+
|
|
127
|
+
# http body (model)
|
|
128
|
+
post_body = opts[:debug_body]
|
|
129
|
+
|
|
130
|
+
# return_type
|
|
131
|
+
return_type = opts[:debug_return_type]
|
|
132
|
+
|
|
133
|
+
# auth_names
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
135
|
+
|
|
136
|
+
new_options = opts.merge(
|
|
137
|
+
:operation => :"VolumesApi.delete_volume",
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: VolumesApi#delete_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
return data, status_code, headers
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Get volume details
|
|
154
|
+
# @param volume_id [String] ID of the volume
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
157
|
+
# @return [VolumeDto]
|
|
158
|
+
def get_volume(volume_id, opts = {})
|
|
159
|
+
data, _status_code, _headers = get_volume_with_http_info(volume_id, opts)
|
|
160
|
+
data
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Get volume details
|
|
164
|
+
# @param volume_id [String] ID of the volume
|
|
165
|
+
# @param [Hash] opts the optional parameters
|
|
166
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
167
|
+
# @return [Array<(VolumeDto, Integer, Hash)>] VolumeDto data, response status code and response headers
|
|
168
|
+
def get_volume_with_http_info(volume_id, opts = {})
|
|
169
|
+
if @api_client.config.debugging
|
|
170
|
+
@api_client.config.logger.debug 'Calling API: VolumesApi.get_volume ...'
|
|
171
|
+
end
|
|
172
|
+
# verify the required parameter 'volume_id' is set
|
|
173
|
+
if @api_client.config.client_side_validation && volume_id.nil?
|
|
174
|
+
fail ArgumentError, "Missing the required parameter 'volume_id' when calling VolumesApi.get_volume"
|
|
175
|
+
end
|
|
176
|
+
# resource path
|
|
177
|
+
local_var_path = '/volumes/{volumeId}'.sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))
|
|
178
|
+
|
|
179
|
+
# query parameters
|
|
180
|
+
query_params = opts[:query_params] || {}
|
|
181
|
+
|
|
182
|
+
# header parameters
|
|
183
|
+
header_params = opts[:header_params] || {}
|
|
184
|
+
# HTTP header 'Accept' (if needed)
|
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
186
|
+
header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
|
|
187
|
+
|
|
188
|
+
# form parameters
|
|
189
|
+
form_params = opts[:form_params] || {}
|
|
190
|
+
|
|
191
|
+
# http body (model)
|
|
192
|
+
post_body = opts[:debug_body]
|
|
193
|
+
|
|
194
|
+
# return_type
|
|
195
|
+
return_type = opts[:debug_return_type] || 'VolumeDto'
|
|
196
|
+
|
|
197
|
+
# auth_names
|
|
198
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
199
|
+
|
|
200
|
+
new_options = opts.merge(
|
|
201
|
+
:operation => :"VolumesApi.get_volume",
|
|
202
|
+
:header_params => header_params,
|
|
203
|
+
:query_params => query_params,
|
|
204
|
+
:form_params => form_params,
|
|
205
|
+
:body => post_body,
|
|
206
|
+
:auth_names => auth_names,
|
|
207
|
+
:return_type => return_type
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "API called: VolumesApi#get_volume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
+
end
|
|
214
|
+
return data, status_code, headers
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Get volume details by name
|
|
218
|
+
# @param name [String] Name of the volume
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
221
|
+
# @return [VolumeDto]
|
|
222
|
+
def get_volume_by_name(name, opts = {})
|
|
223
|
+
data, _status_code, _headers = get_volume_by_name_with_http_info(name, opts)
|
|
224
|
+
data
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Get volume details by name
|
|
228
|
+
# @param name [String] Name of the volume
|
|
229
|
+
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
231
|
+
# @return [Array<(VolumeDto, Integer, Hash)>] VolumeDto data, response status code and response headers
|
|
232
|
+
def get_volume_by_name_with_http_info(name, opts = {})
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug 'Calling API: VolumesApi.get_volume_by_name ...'
|
|
235
|
+
end
|
|
236
|
+
# verify the required parameter 'name' is set
|
|
237
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
238
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling VolumesApi.get_volume_by_name"
|
|
239
|
+
end
|
|
240
|
+
# resource path
|
|
241
|
+
local_var_path = '/volumes/by-name/{name}'.sub('{' + 'name' + '}', CGI.escape(name.to_s))
|
|
242
|
+
|
|
243
|
+
# query parameters
|
|
244
|
+
query_params = opts[:query_params] || {}
|
|
245
|
+
|
|
246
|
+
# header parameters
|
|
247
|
+
header_params = opts[:header_params] || {}
|
|
248
|
+
# HTTP header 'Accept' (if needed)
|
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
250
|
+
header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
|
|
251
|
+
|
|
252
|
+
# form parameters
|
|
253
|
+
form_params = opts[:form_params] || {}
|
|
254
|
+
|
|
255
|
+
# http body (model)
|
|
256
|
+
post_body = opts[:debug_body]
|
|
257
|
+
|
|
258
|
+
# return_type
|
|
259
|
+
return_type = opts[:debug_return_type] || 'VolumeDto'
|
|
260
|
+
|
|
261
|
+
# auth_names
|
|
262
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
263
|
+
|
|
264
|
+
new_options = opts.merge(
|
|
265
|
+
:operation => :"VolumesApi.get_volume_by_name",
|
|
266
|
+
:header_params => header_params,
|
|
267
|
+
:query_params => query_params,
|
|
268
|
+
:form_params => form_params,
|
|
269
|
+
:body => post_body,
|
|
270
|
+
:auth_names => auth_names,
|
|
271
|
+
:return_type => return_type
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
275
|
+
if @api_client.config.debugging
|
|
276
|
+
@api_client.config.logger.debug "API called: VolumesApi#get_volume_by_name\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
277
|
+
end
|
|
278
|
+
return data, status_code, headers
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# List all volumes
|
|
282
|
+
# @param [Hash] opts the optional parameters
|
|
283
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
284
|
+
# @option opts [Boolean] :include_deleted Include deleted volumes in the response
|
|
285
|
+
# @return [Array<VolumeDto>]
|
|
286
|
+
def list_volumes(opts = {})
|
|
287
|
+
data, _status_code, _headers = list_volumes_with_http_info(opts)
|
|
288
|
+
data
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# List all volumes
|
|
292
|
+
# @param [Hash] opts the optional parameters
|
|
293
|
+
# @option opts [String] :x_nightona_organization_id Use with JWT to specify the organization ID
|
|
294
|
+
# @option opts [Boolean] :include_deleted Include deleted volumes in the response
|
|
295
|
+
# @return [Array<(Array<VolumeDto>, Integer, Hash)>] Array<VolumeDto> data, response status code and response headers
|
|
296
|
+
def list_volumes_with_http_info(opts = {})
|
|
297
|
+
if @api_client.config.debugging
|
|
298
|
+
@api_client.config.logger.debug 'Calling API: VolumesApi.list_volumes ...'
|
|
299
|
+
end
|
|
300
|
+
# resource path
|
|
301
|
+
local_var_path = '/volumes'
|
|
302
|
+
|
|
303
|
+
# query parameters
|
|
304
|
+
query_params = opts[:query_params] || {}
|
|
305
|
+
query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
|
|
306
|
+
|
|
307
|
+
# header parameters
|
|
308
|
+
header_params = opts[:header_params] || {}
|
|
309
|
+
# HTTP header 'Accept' (if needed)
|
|
310
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
311
|
+
header_params[:'X-Nightona-Organization-ID'] = opts[:'x_nightona_organization_id'] if !opts[:'x_nightona_organization_id'].nil?
|
|
312
|
+
|
|
313
|
+
# form parameters
|
|
314
|
+
form_params = opts[:form_params] || {}
|
|
315
|
+
|
|
316
|
+
# http body (model)
|
|
317
|
+
post_body = opts[:debug_body]
|
|
318
|
+
|
|
319
|
+
# return_type
|
|
320
|
+
return_type = opts[:debug_return_type] || 'Array<VolumeDto>'
|
|
321
|
+
|
|
322
|
+
# auth_names
|
|
323
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
324
|
+
|
|
325
|
+
new_options = opts.merge(
|
|
326
|
+
:operation => :"VolumesApi.list_volumes",
|
|
327
|
+
:header_params => header_params,
|
|
328
|
+
:query_params => query_params,
|
|
329
|
+
:form_params => form_params,
|
|
330
|
+
:body => post_body,
|
|
331
|
+
:auth_names => auth_names,
|
|
332
|
+
:return_type => return_type
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
336
|
+
if @api_client.config.debugging
|
|
337
|
+
@api_client.config.logger.debug "API called: VolumesApi#list_volumes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
338
|
+
end
|
|
339
|
+
return data, status_code, headers
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|