rocket_stack_sdk 1.0.1
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/Gemfile +9 -0
- data/README.md +226 -0
- data/Rakefile +10 -0
- data/docs/CreateCronJob201Response.md +22 -0
- data/docs/CreateCronJob201ResponseData.md +20 -0
- data/docs/CreateCronJobRequest.md +26 -0
- data/docs/CreateCronJobRequestDeliveryTarget.md +32 -0
- data/docs/CreateCronJobRequestSchedule.md +22 -0
- data/docs/CreateDownloadUrl200Response.md +22 -0
- data/docs/CreateDownloadUrl200ResponseData.md +24 -0
- data/docs/CreateDownloadUrlRequest.md +22 -0
- data/docs/CreateFunction202Response.md +22 -0
- data/docs/CreateFunction202ResponseData.md +20 -0
- data/docs/CreateQueue201Response.md +22 -0
- data/docs/CreateQueue201ResponseData.md +20 -0
- data/docs/CreateQueueRequest.md +26 -0
- data/docs/CreateQueueRequestDeliveryTarget.md +32 -0
- data/docs/CreateSchedule201Response.md +22 -0
- data/docs/CreateSchedule201ResponseData.md +20 -0
- data/docs/CreateScheduleRequest.md +26 -0
- data/docs/CronApi.md +365 -0
- data/docs/DeleteKvItem200Response.md +22 -0
- data/docs/DeleteKvItem200ResponseData.md +18 -0
- data/docs/EnqueueMessage201Response.md +22 -0
- data/docs/EnqueueMessage201ResponseData.md +20 -0
- data/docs/EnqueueMessageRequest.md +22 -0
- data/docs/FinalizeUpload200Response.md +22 -0
- data/docs/FinalizeUpload200ResponseData.md +24 -0
- data/docs/FinalizeUploadRequest.md +18 -0
- data/docs/FunctionsApi.md +463 -0
- data/docs/GetCronJob200Response.md +22 -0
- data/docs/GetFunction200Response.md +22 -0
- data/docs/GetKvItem200Response.md +22 -0
- data/docs/GetKvItem200ResponseData.md +24 -0
- data/docs/GetMessageStatus200Response.md +22 -0
- data/docs/GetMessageStatus200ResponseData.md +30 -0
- data/docs/GetQueue200Response.md +22 -0
- data/docs/GetSchedule200Response.md +22 -0
- data/docs/GetScheduleStatus200Response.md +22 -0
- data/docs/GetScheduleStatus200ResponseData.md +26 -0
- data/docs/GetTemplate200Response.md +22 -0
- data/docs/InvokeFunction200Response.md +22 -0
- data/docs/InvokeFunction200ResponseData.md +26 -0
- data/docs/InvokeFunctionRequest.md +22 -0
- data/docs/KvApi.md +297 -0
- data/docs/ListCapabilities200Response.md +22 -0
- data/docs/ListCapabilities200ResponseDataInner.md +22 -0
- data/docs/ListCronJobs200Response.md +22 -0
- data/docs/ListCronJobs200ResponseData.md +20 -0
- data/docs/ListCronJobs200ResponseDataItemsInner.md +36 -0
- data/docs/ListCronJobs200ResponseDataItemsInnerSchedule.md +24 -0
- data/docs/ListFunctions200Response.md +22 -0
- data/docs/ListFunctions200ResponseData.md +20 -0
- data/docs/ListFunctions200ResponseDataItemsInner.md +38 -0
- data/docs/ListFunctions200ResponseDataItemsInnerActualSpec.md +18 -0
- data/docs/ListFunctions200ResponseDataItemsInnerDesiredSpec.md +36 -0
- data/docs/ListFunctions200ResponseDataItemsInnerDesiredSpecCode.md +20 -0
- data/docs/ListFunctions200ResponseError.md +22 -0
- data/docs/ListFunctions401Response.md +20 -0
- data/docs/ListKvItems200Response.md +22 -0
- data/docs/ListKvItems200ResponseData.md +20 -0
- data/docs/ListKvItems200ResponseDataItemsInner.md +24 -0
- data/docs/ListQueues200Response.md +22 -0
- data/docs/ListQueues200ResponseData.md +20 -0
- data/docs/ListQueues200ResponseDataItemsInner.md +36 -0
- data/docs/ListQueues200ResponseDataItemsInnerDeliveryTarget.md +28 -0
- data/docs/ListSchedules200Response.md +22 -0
- data/docs/ListSchedules200ResponseData.md +20 -0
- data/docs/ListSchedules200ResponseDataItemsInner.md +36 -0
- data/docs/ListSnippets200Response.md +22 -0
- data/docs/ListSnippets200ResponseDataInner.md +28 -0
- data/docs/ListStorageObjects200Response.md +22 -0
- data/docs/ListStorageObjects200ResponseData.md +20 -0
- data/docs/ListStorageObjects200ResponseDataItemsInner.md +28 -0
- data/docs/ListTemplates200Response.md +22 -0
- data/docs/ListTemplates200ResponseDataInner.md +28 -0
- data/docs/PutKvItem200Response.md +22 -0
- data/docs/PutKvItem200ResponseData.md +22 -0
- data/docs/PutKvItemRequest.md +24 -0
- data/docs/PutKvItemRequestIfVersion.md +15 -0
- data/docs/QueuesApi.md +511 -0
- data/docs/ResourcesApi.md +290 -0
- data/docs/SchedulerApi.md +505 -0
- data/docs/StorageApi.md +447 -0
- data/docs/UpdateCronJob200Response.md +22 -0
- data/docs/UpdateCronJob200ResponseData.md +22 -0
- data/docs/UpdateCronJobRequest.md +24 -0
- data/docs/UpdateCronJobRequestSchedule.md +22 -0
- data/docs/UpdateFunctionRequest.md +30 -0
- data/docs/UpdateQueue200Response.md +22 -0
- data/docs/UpdateQueue200ResponseData.md +22 -0
- data/docs/UpdateQueueRequest.md +24 -0
- data/docs/UpdateSchedule200Response.md +22 -0
- data/docs/UpdateSchedule200ResponseData.md +22 -0
- data/docs/UpdateScheduleRequest.md +24 -0
- data/docs/UploadObject201Response.md +22 -0
- data/docs/UploadObject201ResponseData.md +26 -0
- data/git_push.sh +57 -0
- data/lib/rocket_stack_sdk/api/cron_api.rb +357 -0
- data/lib/rocket_stack_sdk/api/functions_api.rb +536 -0
- data/lib/rocket_stack_sdk/api/kv_api.rb +308 -0
- data/lib/rocket_stack_sdk/api/queues_api.rb +496 -0
- data/lib/rocket_stack_sdk/api/resources_api.rb +277 -0
- data/lib/rocket_stack_sdk/api/scheduler_api.rb +483 -0
- data/lib/rocket_stack_sdk/api/storage_api.rb +474 -0
- data/lib/rocket_stack_sdk/api_client.rb +397 -0
- data/lib/rocket_stack_sdk/api_error.rb +58 -0
- data/lib/rocket_stack_sdk/api_model_base.rb +88 -0
- data/lib/rocket_stack_sdk/configuration.rb +309 -0
- data/lib/rocket_stack_sdk/models/create_cron_job201_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/create_cron_job201_response_data.rb +190 -0
- data/lib/rocket_stack_sdk/models/create_cron_job_request.rb +265 -0
- data/lib/rocket_stack_sdk/models/create_cron_job_request_delivery_target.rb +343 -0
- data/lib/rocket_stack_sdk/models/create_cron_job_request_schedule.rb +227 -0
- data/lib/rocket_stack_sdk/models/create_download_url200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/create_download_url200_response_data.rb +211 -0
- data/lib/rocket_stack_sdk/models/create_download_url_request.rb +228 -0
- data/lib/rocket_stack_sdk/models/create_function202_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/create_function202_response_data.rb +190 -0
- data/lib/rocket_stack_sdk/models/create_queue201_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/create_queue201_response_data.rb +190 -0
- data/lib/rocket_stack_sdk/models/create_queue_request.rb +313 -0
- data/lib/rocket_stack_sdk/models/create_queue_request_delivery_target.rb +343 -0
- data/lib/rocket_stack_sdk/models/create_schedule201_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/create_schedule201_response_data.rb +190 -0
- data/lib/rocket_stack_sdk/models/create_schedule_request.rb +265 -0
- data/lib/rocket_stack_sdk/models/delete_kv_item200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/delete_kv_item200_response_data.rb +164 -0
- data/lib/rocket_stack_sdk/models/enqueue_message201_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/enqueue_message201_response_data.rb +190 -0
- data/lib/rocket_stack_sdk/models/enqueue_message_request.rb +213 -0
- data/lib/rocket_stack_sdk/models/finalize_upload200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/finalize_upload200_response_data.rb +242 -0
- data/lib/rocket_stack_sdk/models/finalize_upload_request.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_cron_job200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_function200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_kv_item200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_kv_item200_response_data.rb +212 -0
- data/lib/rocket_stack_sdk/models/get_message_status200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_message_status200_response_data.rb +303 -0
- data/lib/rocket_stack_sdk/models/get_queue200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_schedule200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_schedule_status200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/get_schedule_status200_response_data.rb +240 -0
- data/lib/rocket_stack_sdk/models/get_template200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/invoke_function200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/invoke_function200_response_data.rb +201 -0
- data/lib/rocket_stack_sdk/models/invoke_function_request.rb +204 -0
- data/lib/rocket_stack_sdk/models/list_capabilities200_response.rb +184 -0
- data/lib/rocket_stack_sdk/models/list_capabilities200_response_data_inner.rb +216 -0
- data/lib/rocket_stack_sdk/models/list_cron_jobs200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data.rb +176 -0
- data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data_items_inner.rb +384 -0
- data/lib/rocket_stack_sdk/models/list_cron_jobs200_response_data_items_inner_schedule.rb +249 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response_data.rb +176 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner.rb +393 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_actual_spec.rb +164 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_desired_spec.rb +352 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response_data_items_inner_desired_spec_code.rb +174 -0
- data/lib/rocket_stack_sdk/models/list_functions200_response_error.rb +201 -0
- data/lib/rocket_stack_sdk/models/list_functions401_response.rb +190 -0
- data/lib/rocket_stack_sdk/models/list_kv_items200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/list_kv_items200_response_data.rb +178 -0
- data/lib/rocket_stack_sdk/models/list_kv_items200_response_data_items_inner.rb +228 -0
- data/lib/rocket_stack_sdk/models/list_queues200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/list_queues200_response_data.rb +176 -0
- data/lib/rocket_stack_sdk/models/list_queues200_response_data_items_inner.rb +381 -0
- data/lib/rocket_stack_sdk/models/list_queues200_response_data_items_inner_delivery_target.rb +267 -0
- data/lib/rocket_stack_sdk/models/list_schedules200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/list_schedules200_response_data.rb +176 -0
- data/lib/rocket_stack_sdk/models/list_schedules200_response_data_items_inner.rb +384 -0
- data/lib/rocket_stack_sdk/models/list_snippets200_response.rb +184 -0
- data/lib/rocket_stack_sdk/models/list_snippets200_response_data_inner.rb +294 -0
- data/lib/rocket_stack_sdk/models/list_storage_objects200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/list_storage_objects200_response_data.rb +178 -0
- data/lib/rocket_stack_sdk/models/list_storage_objects200_response_data_items_inner.rb +260 -0
- data/lib/rocket_stack_sdk/models/list_templates200_response.rb +184 -0
- data/lib/rocket_stack_sdk/models/list_templates200_response_data_inner.rb +262 -0
- data/lib/rocket_stack_sdk/models/put_kv_item200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/put_kv_item200_response_data.rb +202 -0
- data/lib/rocket_stack_sdk/models/put_kv_item_request.rb +203 -0
- data/lib/rocket_stack_sdk/models/put_kv_item_request_if_version.rb +103 -0
- data/lib/rocket_stack_sdk/models/update_cron_job200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/update_cron_job200_response_data.rb +216 -0
- data/lib/rocket_stack_sdk/models/update_cron_job_request.rb +177 -0
- data/lib/rocket_stack_sdk/models/update_cron_job_request_schedule.rb +220 -0
- data/lib/rocket_stack_sdk/models/update_function_request.rb +337 -0
- data/lib/rocket_stack_sdk/models/update_queue200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/update_queue200_response_data.rb +216 -0
- data/lib/rocket_stack_sdk/models/update_queue_request.rb +258 -0
- data/lib/rocket_stack_sdk/models/update_schedule200_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/update_schedule200_response_data.rb +216 -0
- data/lib/rocket_stack_sdk/models/update_schedule_request.rb +177 -0
- data/lib/rocket_stack_sdk/models/upload_object201_response.rb +182 -0
- data/lib/rocket_stack_sdk/models/upload_object201_response_data.rb +251 -0
- data/lib/rocket_stack_sdk/version.rb +15 -0
- data/lib/rocket_stack_sdk.rb +134 -0
- data/rocket_stack_sdk.gemspec +39 -0
- data/spec/api/cron_api_spec.rb +97 -0
- data/spec/api/functions_api_spec.rb +121 -0
- data/spec/api/kv_api_spec.rb +86 -0
- data/spec/api/queues_api_spec.rb +123 -0
- data/spec/api/resources_api_spec.rb +83 -0
- data/spec/api/scheduler_api_spec.rb +121 -0
- data/spec/api/storage_api_spec.rb +114 -0
- data/spec/models/create_cron_job201_response_data_spec.rb +42 -0
- data/spec/models/create_cron_job201_response_spec.rb +48 -0
- data/spec/models/create_cron_job_request_delivery_target_spec.rb +82 -0
- data/spec/models/create_cron_job_request_schedule_spec.rb +52 -0
- data/spec/models/create_cron_job_request_spec.rb +60 -0
- data/spec/models/create_download_url200_response_data_spec.rb +54 -0
- data/spec/models/create_download_url200_response_spec.rb +48 -0
- data/spec/models/create_download_url_request_spec.rb +48 -0
- data/spec/models/create_function202_response_data_spec.rb +42 -0
- data/spec/models/create_function202_response_spec.rb +48 -0
- data/spec/models/create_queue201_response_data_spec.rb +42 -0
- data/spec/models/create_queue201_response_spec.rb +48 -0
- data/spec/models/create_queue_request_delivery_target_spec.rb +82 -0
- data/spec/models/create_queue_request_spec.rb +60 -0
- data/spec/models/create_schedule201_response_data_spec.rb +42 -0
- data/spec/models/create_schedule201_response_spec.rb +48 -0
- data/spec/models/create_schedule_request_spec.rb +60 -0
- data/spec/models/delete_kv_item200_response_data_spec.rb +36 -0
- data/spec/models/delete_kv_item200_response_spec.rb +48 -0
- data/spec/models/enqueue_message201_response_data_spec.rb +42 -0
- data/spec/models/enqueue_message201_response_spec.rb +48 -0
- data/spec/models/enqueue_message_request_spec.rb +48 -0
- data/spec/models/finalize_upload200_response_data_spec.rb +54 -0
- data/spec/models/finalize_upload200_response_spec.rb +48 -0
- data/spec/models/finalize_upload_request_spec.rb +36 -0
- data/spec/models/get_cron_job200_response_spec.rb +48 -0
- data/spec/models/get_function200_response_spec.rb +48 -0
- data/spec/models/get_kv_item200_response_data_spec.rb +54 -0
- data/spec/models/get_kv_item200_response_spec.rb +48 -0
- data/spec/models/get_message_status200_response_data_spec.rb +72 -0
- data/spec/models/get_message_status200_response_spec.rb +48 -0
- data/spec/models/get_queue200_response_spec.rb +48 -0
- data/spec/models/get_schedule200_response_spec.rb +48 -0
- data/spec/models/get_schedule_status200_response_data_spec.rb +60 -0
- data/spec/models/get_schedule_status200_response_spec.rb +48 -0
- data/spec/models/get_template200_response_spec.rb +48 -0
- data/spec/models/invoke_function200_response_data_spec.rb +60 -0
- data/spec/models/invoke_function200_response_spec.rb +48 -0
- data/spec/models/invoke_function_request_spec.rb +52 -0
- data/spec/models/list_capabilities200_response_data_inner_spec.rb +48 -0
- data/spec/models/list_capabilities200_response_spec.rb +48 -0
- data/spec/models/list_cron_jobs200_response_data_items_inner_schedule_spec.rb +58 -0
- data/spec/models/list_cron_jobs200_response_data_items_inner_spec.rb +90 -0
- data/spec/models/list_cron_jobs200_response_data_spec.rb +42 -0
- data/spec/models/list_cron_jobs200_response_spec.rb +48 -0
- data/spec/models/list_functions200_response_data_items_inner_actual_spec_spec.rb +36 -0
- data/spec/models/list_functions200_response_data_items_inner_desired_spec_code_spec.rb +42 -0
- data/spec/models/list_functions200_response_data_items_inner_desired_spec_spec.rb +98 -0
- data/spec/models/list_functions200_response_data_items_inner_spec.rb +96 -0
- data/spec/models/list_functions200_response_data_spec.rb +42 -0
- data/spec/models/list_functions200_response_error_spec.rb +48 -0
- data/spec/models/list_functions200_response_spec.rb +48 -0
- data/spec/models/list_functions401_response_spec.rb +42 -0
- data/spec/models/list_kv_items200_response_data_items_inner_spec.rb +54 -0
- data/spec/models/list_kv_items200_response_data_spec.rb +42 -0
- data/spec/models/list_kv_items200_response_spec.rb +48 -0
- data/spec/models/list_queues200_response_data_items_inner_delivery_target_spec.rb +70 -0
- data/spec/models/list_queues200_response_data_items_inner_spec.rb +90 -0
- data/spec/models/list_queues200_response_data_spec.rb +42 -0
- data/spec/models/list_queues200_response_spec.rb +48 -0
- data/spec/models/list_schedules200_response_data_items_inner_spec.rb +90 -0
- data/spec/models/list_schedules200_response_data_spec.rb +42 -0
- data/spec/models/list_schedules200_response_spec.rb +48 -0
- data/spec/models/list_snippets200_response_data_inner_spec.rb +66 -0
- data/spec/models/list_snippets200_response_spec.rb +48 -0
- data/spec/models/list_storage_objects200_response_data_items_inner_spec.rb +66 -0
- data/spec/models/list_storage_objects200_response_data_spec.rb +42 -0
- data/spec/models/list_storage_objects200_response_spec.rb +48 -0
- data/spec/models/list_templates200_response_data_inner_spec.rb +66 -0
- data/spec/models/list_templates200_response_spec.rb +48 -0
- data/spec/models/put_kv_item200_response_data_spec.rb +48 -0
- data/spec/models/put_kv_item200_response_spec.rb +48 -0
- data/spec/models/put_kv_item_request_if_version_spec.rb +21 -0
- data/spec/models/put_kv_item_request_spec.rb +54 -0
- data/spec/models/update_cron_job200_response_data_spec.rb +48 -0
- data/spec/models/update_cron_job200_response_spec.rb +48 -0
- data/spec/models/update_cron_job_request_schedule_spec.rb +52 -0
- data/spec/models/update_cron_job_request_spec.rb +54 -0
- data/spec/models/update_function_request_spec.rb +76 -0
- data/spec/models/update_queue200_response_data_spec.rb +48 -0
- data/spec/models/update_queue200_response_spec.rb +48 -0
- data/spec/models/update_queue_request_spec.rb +54 -0
- data/spec/models/update_schedule200_response_data_spec.rb +48 -0
- data/spec/models/update_schedule200_response_spec.rb +48 -0
- data/spec/models/update_schedule_request_spec.rb +54 -0
- data/spec/models/upload_object201_response_data_spec.rb +60 -0
- data/spec/models/upload_object201_response_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +472 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Rocketstack API
|
|
3
|
+
|
|
4
|
+
#API for Functions, Queues, KV, Storage, Cron, and Scheduler.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module RocketStackSdk
|
|
17
|
+
class UpdateCronJobRequestSchedule < ApiModelBase
|
|
18
|
+
attr_accessor :expression
|
|
19
|
+
|
|
20
|
+
attr_accessor :format
|
|
21
|
+
|
|
22
|
+
attr_accessor :timezone
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'expression' => :'expression',
|
|
50
|
+
:'format' => :'format',
|
|
51
|
+
:'timezone' => :'timezone'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'expression' => :'String',
|
|
69
|
+
:'format' => :'String',
|
|
70
|
+
:'timezone' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::UpdateCronJobRequestSchedule` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::UpdateCronJobRequestSchedule`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'expression')
|
|
97
|
+
self.expression = attributes[:'expression']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'format')
|
|
101
|
+
self.format = attributes[:'format']
|
|
102
|
+
else
|
|
103
|
+
self.format = 'unix5'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'timezone')
|
|
107
|
+
self.timezone = attributes[:'timezone']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
115
|
+
invalid_properties = Array.new
|
|
116
|
+
if !@expression.nil? && @expression.to_s.length < 1
|
|
117
|
+
invalid_properties.push('invalid value for "expression", the character length must be greater than or equal to 1.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
invalid_properties
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Check to see if the all the properties in the model are valid
|
|
124
|
+
# @return true if the model is valid
|
|
125
|
+
def valid?
|
|
126
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
|
+
return false if !@expression.nil? && @expression.to_s.length < 1
|
|
128
|
+
format_validator = EnumAttributeValidator.new('String', ["aws", "unix5"])
|
|
129
|
+
return false unless format_validator.valid?(@format)
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Custom attribute writer method with validation
|
|
134
|
+
# @param [Object] expression Value to be assigned
|
|
135
|
+
def expression=(expression)
|
|
136
|
+
if expression.nil?
|
|
137
|
+
fail ArgumentError, 'expression cannot be nil'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if expression.to_s.length < 1
|
|
141
|
+
fail ArgumentError, 'invalid value for "expression", the character length must be greater than or equal to 1.'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@expression = expression
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
148
|
+
# @param [Object] format Object to be assigned
|
|
149
|
+
def format=(format)
|
|
150
|
+
validator = EnumAttributeValidator.new('String', ["aws", "unix5"])
|
|
151
|
+
unless validator.valid?(format)
|
|
152
|
+
fail ArgumentError, "invalid value for \"format\", must be one of #{validator.allowable_values}."
|
|
153
|
+
end
|
|
154
|
+
@format = format
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Checks equality by comparing each attribute.
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def ==(o)
|
|
160
|
+
return true if self.equal?(o)
|
|
161
|
+
self.class == o.class &&
|
|
162
|
+
expression == o.expression &&
|
|
163
|
+
format == o.format &&
|
|
164
|
+
timezone == o.timezone
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[expression, format, timezone].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
transformed_hash = {}
|
|
186
|
+
openapi_types.each_pair do |key, type|
|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = nil
|
|
189
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
190
|
+
# check to ensure the input is an array given that the attribute
|
|
191
|
+
# is documented as an array but the input is not
|
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
194
|
+
end
|
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
new(transformed_hash)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Rocketstack API
|
|
3
|
+
|
|
4
|
+
#API for Functions, Queues, KV, Storage, Cron, and Scheduler.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module RocketStackSdk
|
|
17
|
+
class UpdateFunctionRequest < ApiModelBase
|
|
18
|
+
attr_accessor :memory_mb
|
|
19
|
+
|
|
20
|
+
attr_accessor :timeout_seconds
|
|
21
|
+
|
|
22
|
+
attr_accessor :env
|
|
23
|
+
|
|
24
|
+
attr_accessor :reserved_concurrency
|
|
25
|
+
|
|
26
|
+
attr_accessor :description
|
|
27
|
+
|
|
28
|
+
attr_accessor :is_public
|
|
29
|
+
|
|
30
|
+
attr_accessor :public_method
|
|
31
|
+
|
|
32
|
+
class EnumAttributeValidator
|
|
33
|
+
attr_reader :datatype
|
|
34
|
+
attr_reader :allowable_values
|
|
35
|
+
|
|
36
|
+
def initialize(datatype, allowable_values)
|
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
|
38
|
+
case datatype.to_s
|
|
39
|
+
when /Integer/i
|
|
40
|
+
value.to_i
|
|
41
|
+
when /Float/i
|
|
42
|
+
value.to_f
|
|
43
|
+
else
|
|
44
|
+
value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def valid?(value)
|
|
50
|
+
!value || allowable_values.include?(value)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'memory_mb' => :'memoryMb',
|
|
58
|
+
:'timeout_seconds' => :'timeoutSeconds',
|
|
59
|
+
:'env' => :'env',
|
|
60
|
+
:'reserved_concurrency' => :'reservedConcurrency',
|
|
61
|
+
:'description' => :'description',
|
|
62
|
+
:'is_public' => :'isPublic',
|
|
63
|
+
:'public_method' => :'publicMethod'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns attribute mapping this model knows about
|
|
68
|
+
def self.acceptable_attribute_map
|
|
69
|
+
attribute_map
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
acceptable_attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'memory_mb' => :'Float',
|
|
81
|
+
:'timeout_seconds' => :'Float',
|
|
82
|
+
:'env' => :'Hash<String, String>',
|
|
83
|
+
:'reserved_concurrency' => :'Float',
|
|
84
|
+
:'description' => :'String',
|
|
85
|
+
:'is_public' => :'Boolean',
|
|
86
|
+
:'public_method' => :'String'
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# List of attributes with nullable: true
|
|
91
|
+
def self.openapi_nullable
|
|
92
|
+
Set.new([
|
|
93
|
+
:'reserved_concurrency',
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RocketStackSdk::UpdateFunctionRequest` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
107
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RocketStackSdk::UpdateFunctionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
109
|
+
end
|
|
110
|
+
h[k.to_sym] = v
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'memory_mb')
|
|
114
|
+
self.memory_mb = attributes[:'memory_mb']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'timeout_seconds')
|
|
118
|
+
self.timeout_seconds = attributes[:'timeout_seconds']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'env')
|
|
122
|
+
if (value = attributes[:'env']).is_a?(Hash)
|
|
123
|
+
self.env = value
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'reserved_concurrency')
|
|
128
|
+
self.reserved_concurrency = attributes[:'reserved_concurrency']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'description')
|
|
132
|
+
self.description = attributes[:'description']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'is_public')
|
|
136
|
+
self.is_public = attributes[:'is_public']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'public_method')
|
|
140
|
+
self.public_method = attributes[:'public_method']
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
145
|
+
# @return Array for valid properties with the reasons
|
|
146
|
+
def list_invalid_properties
|
|
147
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
148
|
+
invalid_properties = Array.new
|
|
149
|
+
if !@memory_mb.nil? && @memory_mb > 10240
|
|
150
|
+
invalid_properties.push('invalid value for "memory_mb", must be smaller than or equal to 10240.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if !@memory_mb.nil? && @memory_mb < 128
|
|
154
|
+
invalid_properties.push('invalid value for "memory_mb", must be greater than or equal to 128.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if !@timeout_seconds.nil? && @timeout_seconds > 60
|
|
158
|
+
invalid_properties.push('invalid value for "timeout_seconds", must be smaller than or equal to 60.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if !@timeout_seconds.nil? && @timeout_seconds < 1
|
|
162
|
+
invalid_properties.push('invalid value for "timeout_seconds", must be greater than or equal to 1.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if !@reserved_concurrency.nil? && @reserved_concurrency > 100
|
|
166
|
+
invalid_properties.push('invalid value for "reserved_concurrency", must be smaller than or equal to 100.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if !@reserved_concurrency.nil? && @reserved_concurrency < 0
|
|
170
|
+
invalid_properties.push('invalid value for "reserved_concurrency", must be greater than or equal to 0.')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if !@description.nil? && @description.to_s.length > 256
|
|
174
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 256.')
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
invalid_properties
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Check to see if the all the properties in the model are valid
|
|
181
|
+
# @return true if the model is valid
|
|
182
|
+
def valid?
|
|
183
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
184
|
+
return false if !@memory_mb.nil? && @memory_mb > 10240
|
|
185
|
+
return false if !@memory_mb.nil? && @memory_mb < 128
|
|
186
|
+
return false if !@timeout_seconds.nil? && @timeout_seconds > 60
|
|
187
|
+
return false if !@timeout_seconds.nil? && @timeout_seconds < 1
|
|
188
|
+
return false if !@reserved_concurrency.nil? && @reserved_concurrency > 100
|
|
189
|
+
return false if !@reserved_concurrency.nil? && @reserved_concurrency < 0
|
|
190
|
+
return false if !@description.nil? && @description.to_s.length > 256
|
|
191
|
+
public_method_validator = EnumAttributeValidator.new('String', ["GET", "POST", "PATCH", "DELETE"])
|
|
192
|
+
return false unless public_method_validator.valid?(@public_method)
|
|
193
|
+
true
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Custom attribute writer method with validation
|
|
197
|
+
# @param [Object] memory_mb Value to be assigned
|
|
198
|
+
def memory_mb=(memory_mb)
|
|
199
|
+
if memory_mb.nil?
|
|
200
|
+
fail ArgumentError, 'memory_mb cannot be nil'
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if memory_mb > 10240
|
|
204
|
+
fail ArgumentError, 'invalid value for "memory_mb", must be smaller than or equal to 10240.'
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if memory_mb < 128
|
|
208
|
+
fail ArgumentError, 'invalid value for "memory_mb", must be greater than or equal to 128.'
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
@memory_mb = memory_mb
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Custom attribute writer method with validation
|
|
215
|
+
# @param [Object] timeout_seconds Value to be assigned
|
|
216
|
+
def timeout_seconds=(timeout_seconds)
|
|
217
|
+
if timeout_seconds.nil?
|
|
218
|
+
fail ArgumentError, 'timeout_seconds cannot be nil'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if timeout_seconds > 60
|
|
222
|
+
fail ArgumentError, 'invalid value for "timeout_seconds", must be smaller than or equal to 60.'
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if timeout_seconds < 1
|
|
226
|
+
fail ArgumentError, 'invalid value for "timeout_seconds", must be greater than or equal to 1.'
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
@timeout_seconds = timeout_seconds
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Custom attribute writer method with validation
|
|
233
|
+
# @param [Object] reserved_concurrency Value to be assigned
|
|
234
|
+
def reserved_concurrency=(reserved_concurrency)
|
|
235
|
+
if !reserved_concurrency.nil? && reserved_concurrency > 100
|
|
236
|
+
fail ArgumentError, 'invalid value for "reserved_concurrency", must be smaller than or equal to 100.'
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if !reserved_concurrency.nil? && reserved_concurrency < 0
|
|
240
|
+
fail ArgumentError, 'invalid value for "reserved_concurrency", must be greater than or equal to 0.'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
@reserved_concurrency = reserved_concurrency
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] description Value to be assigned
|
|
248
|
+
def description=(description)
|
|
249
|
+
if description.nil?
|
|
250
|
+
fail ArgumentError, 'description cannot be nil'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if description.to_s.length > 256
|
|
254
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 256.'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
@description = description
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
261
|
+
# @param [Object] public_method Object to be assigned
|
|
262
|
+
def public_method=(public_method)
|
|
263
|
+
validator = EnumAttributeValidator.new('String', ["GET", "POST", "PATCH", "DELETE"])
|
|
264
|
+
unless validator.valid?(public_method)
|
|
265
|
+
fail ArgumentError, "invalid value for \"public_method\", must be one of #{validator.allowable_values}."
|
|
266
|
+
end
|
|
267
|
+
@public_method = public_method
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Checks equality by comparing each attribute.
|
|
271
|
+
# @param [Object] Object to be compared
|
|
272
|
+
def ==(o)
|
|
273
|
+
return true if self.equal?(o)
|
|
274
|
+
self.class == o.class &&
|
|
275
|
+
memory_mb == o.memory_mb &&
|
|
276
|
+
timeout_seconds == o.timeout_seconds &&
|
|
277
|
+
env == o.env &&
|
|
278
|
+
reserved_concurrency == o.reserved_concurrency &&
|
|
279
|
+
description == o.description &&
|
|
280
|
+
is_public == o.is_public &&
|
|
281
|
+
public_method == o.public_method
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# @see the `==` method
|
|
285
|
+
# @param [Object] Object to be compared
|
|
286
|
+
def eql?(o)
|
|
287
|
+
self == o
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Calculates hash code according to all attributes.
|
|
291
|
+
# @return [Integer] Hash code
|
|
292
|
+
def hash
|
|
293
|
+
[memory_mb, timeout_seconds, env, reserved_concurrency, description, is_public, public_method].hash
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Builds the object from hash
|
|
297
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
298
|
+
# @return [Object] Returns the model itself
|
|
299
|
+
def self.build_from_hash(attributes)
|
|
300
|
+
return nil unless attributes.is_a?(Hash)
|
|
301
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
302
|
+
transformed_hash = {}
|
|
303
|
+
openapi_types.each_pair do |key, type|
|
|
304
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
305
|
+
transformed_hash["#{key}"] = nil
|
|
306
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
307
|
+
# check to ensure the input is an array given that the attribute
|
|
308
|
+
# is documented as an array but the input is not
|
|
309
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
310
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
311
|
+
end
|
|
312
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
313
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
314
|
+
end
|
|
315
|
+
end
|
|
316
|
+
new(transformed_hash)
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Returns the object in the form of hash
|
|
320
|
+
# @return [Hash] Returns the object in the form of hash
|
|
321
|
+
def to_hash
|
|
322
|
+
hash = {}
|
|
323
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
324
|
+
value = self.send(attr)
|
|
325
|
+
if value.nil?
|
|
326
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
327
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
hash[param] = _to_hash(value)
|
|
331
|
+
end
|
|
332
|
+
hash
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
end
|