composio 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +93 -0
- data/README.md +1779 -0
- data/Rakefile +10 -0
- data/composio.gemspec +39 -0
- data/header.png +0 -0
- data/lib/composio/api/actions_api.rb +1062 -0
- data/lib/composio/api/api_keys_api.rb +268 -0
- data/lib/composio/api/apps_api.rb +266 -0
- data/lib/composio/api/auth_api.rb +370 -0
- data/lib/composio/api/cli_api.rb +266 -0
- data/lib/composio/api/connections_api.rb +591 -0
- data/lib/composio/api/integrations_api.rb +578 -0
- data/lib/composio/api/logs_api.rb +166 -0
- data/lib/composio/api/metadata_api.rb +180 -0
- data/lib/composio/api/team_api.rb +188 -0
- data/lib/composio/api/triggers_api.rb +1222 -0
- data/lib/composio/api_client.rb +436 -0
- data/lib/composio/api_client_custom.rb +14 -0
- data/lib/composio/api_error.rb +53 -0
- data/lib/composio/configuration.rb +330 -0
- data/lib/composio/models/action_details.rb +357 -0
- data/lib/composio/models/action_details_minimal.rb +329 -0
- data/lib/composio/models/action_execution_req_dto.rb +260 -0
- data/lib/composio/models/action_execution_res_dto.rb +238 -0
- data/lib/composio/models/action_log_data.rb +345 -0
- data/lib/composio/models/action_metadata.rb +402 -0
- data/lib/composio/models/action_metadata_type.rb +101 -0
- data/lib/composio/models/actions_controller_v1.rb +222 -0
- data/lib/composio/models/actions_list_response_dto.rb +250 -0
- data/lib/composio/models/actions_minimal_list_response_dto.rb +250 -0
- data/lib/composio/models/actions_query_dto.rb +300 -0
- data/lib/composio/models/active_trigger_instance.rb +311 -0
- data/lib/composio/models/active_triggers_res_dto.rb +238 -0
- data/lib/composio/models/add_repo_url_req_dto.rb +221 -0
- data/lib/composio/models/add_repo_url_res_dto.rb +221 -0
- data/lib/composio/models/add_tools_req_dto.rb +251 -0
- data/lib/composio/models/add_tools_request_dto.rb +251 -0
- data/lib/composio/models/api_key_res_dto.rb +323 -0
- data/lib/composio/models/app_info_response_dto.rb +323 -0
- data/lib/composio/models/app_list_res_dto.rb +238 -0
- data/lib/composio/models/app_query_dto.rb +216 -0
- data/lib/composio/models/auth_config_dto.rb +229 -0
- data/lib/composio/models/cli_query_dto.rb +231 -0
- data/lib/composio/models/connected_account_response_dto.rb +331 -0
- data/lib/composio/models/connection_params.rb +395 -0
- data/lib/composio/models/connection_params_for_account.rb +323 -0
- data/lib/composio/models/connection_params_headers.rb +224 -0
- data/lib/composio/models/connection_with_app_data.rb +358 -0
- data/lib/composio/models/connection_with_app_data_created_at.rb +101 -0
- data/lib/composio/models/connector_list_item_dto.rb +376 -0
- data/lib/composio/models/connector_list_item_dto_created_at.rb +102 -0
- data/lib/composio/models/connector_list_item_dto_updated_at.rb +102 -0
- data/lib/composio/models/create_connector_payload_dto.rb +274 -0
- data/lib/composio/models/create_connector_payload_dto_use_composio_auth.rb +226 -0
- data/lib/composio/models/delete_api_key_req_dto.rb +221 -0
- data/lib/composio/models/delete_api_key_response_dto.rb +221 -0
- data/lib/composio/models/delete_row_apidto.rb +236 -0
- data/lib/composio/models/delete_tools_req_dto.rb +221 -0
- data/lib/composio/models/delete_tools_res_dto.rb +221 -0
- data/lib/composio/models/direct_execute_req_dto.rb +262 -0
- data/lib/composio/models/enable_trigger_body_dto.rb +221 -0
- data/lib/composio/models/enable_trigger_params_dto.rb +236 -0
- data/lib/composio/models/execute_action_res_dto.rb +236 -0
- data/lib/composio/models/generate_api_key_req_dto.rb +221 -0
- data/lib/composio/models/generate_cli_session_req_dto.rb +221 -0
- data/lib/composio/models/generate_cli_session_res_dto.rb +221 -0
- data/lib/composio/models/get_active_triggers_query_dto.rb +276 -0
- data/lib/composio/models/get_cli_session_res_dto.rb +236 -0
- data/lib/composio/models/get_connections_query_dto.rb +287 -0
- data/lib/composio/models/get_connections_response_dto.rb +250 -0
- data/lib/composio/models/get_connections_result.rb +236 -0
- data/lib/composio/models/get_connector_info_res_dto.rb +417 -0
- data/lib/composio/models/get_connector_list_res_dto.rb +253 -0
- data/lib/composio/models/get_logs_dto.rb +288 -0
- data/lib/composio/models/get_logs_query_dto.rb +246 -0
- data/lib/composio/models/get_trigger_params_dto.rb +221 -0
- data/lib/composio/models/get_trigger_response_dto.rb +230 -0
- data/lib/composio/models/handle_trigger_body_dto.rb +221 -0
- data/lib/composio/models/handle_trigger_params_dto.rb +236 -0
- data/lib/composio/models/identify_client_req_dto.rb +231 -0
- data/lib/composio/models/identify_client_res_dto.rb +251 -0
- data/lib/composio/models/initiate_connection_payload_dto.rb +281 -0
- data/lib/composio/models/initiate_connection_response.rb +272 -0
- data/lib/composio/models/invite_member_req_dto.rb +251 -0
- data/lib/composio/models/job_status.rb +37 -0
- data/lib/composio/models/list_triggers_query_dto.rb +246 -0
- data/lib/composio/models/logout_res_dto.rb +221 -0
- data/lib/composio/models/logs_res_dto.rb +233 -0
- data/lib/composio/models/magic_link_req_dto.rb +236 -0
- data/lib/composio/models/magic_link_res_dto.rb +220 -0
- data/lib/composio/models/member_res_dto.rb +305 -0
- data/lib/composio/models/meta.rb +220 -0
- data/lib/composio/models/meta_app.rb +220 -0
- data/lib/composio/models/metadata_query_dto.rb +221 -0
- data/lib/composio/models/metadata_req_dto.rb +232 -0
- data/lib/composio/models/o_auth2_callback_query_dto.rb +220 -0
- data/lib/composio/models/open_api_spec_list_res_dto.rb +436 -0
- data/lib/composio/models/page_info.rb +338 -0
- data/lib/composio/models/page_info_dto.rb +248 -0
- data/lib/composio/models/patch_connector_req_dto.rb +226 -0
- data/lib/composio/models/patch_connector_res_dto.rb +221 -0
- data/lib/composio/models/proxy_execution_req_dto.rb +234 -0
- data/lib/composio/models/redirect_uri_dto.rb +215 -0
- data/lib/composio/models/set_callback_url_body_dto.rb +221 -0
- data/lib/composio/models/single_app_info_res_dto.rb +394 -0
- data/lib/composio/models/single_trigger_res_dto.rb +336 -0
- data/lib/composio/models/status.rb +37 -0
- data/lib/composio/models/switch_trigger_status_body_dto.rb +221 -0
- data/lib/composio/models/switch_trigger_status_params_dto.rb +221 -0
- data/lib/composio/models/time.rb +41 -0
- data/lib/composio/models/toggle_connected_account_response_dto.rb +220 -0
- data/lib/composio/models/toggle_trigger_state_response_dto.rb +220 -0
- data/lib/composio/models/tools_execute_req_dto.rb +275 -0
- data/lib/composio/models/track_client_req_dto.rb +240 -0
- data/lib/composio/models/track_client_res_dto.rb +221 -0
- data/lib/composio/models/trigger_config.rb +237 -0
- data/lib/composio/models/trigger_instance_params_dto.rb +221 -0
- data/lib/composio/models/trigger_log_data.rb +345 -0
- data/lib/composio/models/trigger_log_item_dto.rb +336 -0
- data/lib/composio/models/trigger_logs_res_dto.rb +236 -0
- data/lib/composio/models/trigger_metadata.rb +402 -0
- data/lib/composio/models/trigger_metadata_dto.rb +347 -0
- data/lib/composio/models/trigger_metadata_type.rb +101 -0
- data/lib/composio/models/trigger_res_dto.rb +361 -0
- data/lib/composio/models/trigger_response_dto.rb +241 -0
- data/lib/composio/models/trigger_toggle_info_response_dto.rb +221 -0
- data/lib/composio/models/triggers_enabled_toggle_req_dto.rb +221 -0
- data/lib/composio/models/triggers_enabled_toggle_res_dto.rb +221 -0
- data/lib/composio/models/type.rb +37 -0
- data/lib/composio/models/user_git_user_info.rb +230 -0
- data/lib/composio/models/verify_cli_code_res_dto.rb +251 -0
- data/lib/composio/models/verify_magic_link_data_dto.rb +263 -0
- data/lib/composio/models/verify_magic_link_req_dto.rb +221 -0
- data/lib/composio/models/verify_magic_link_res_dto.rb +230 -0
- data/lib/composio/models/webhook_url_response_dto.rb +231 -0
- data/lib/composio/version.rb +11 -0
- data/lib/composio.rb +214 -0
- data/spec/api/actions_api_spec.rb +164 -0
- data/spec/api/api_keys_api_spec.rb +61 -0
- data/spec/api/apps_api_spec.rb +63 -0
- data/spec/api/auth_api_spec.rb +73 -0
- data/spec/api/cli_api_spec.rb +63 -0
- data/spec/api/connections_api_spec.rb +103 -0
- data/spec/api/integrations_api_spec.rb +96 -0
- data/spec/api/logs_api_spec.rb +48 -0
- data/spec/api/metadata_api_spec.rb +50 -0
- data/spec/api/team_api_spec.rb +50 -0
- data/spec/api/triggers_api_spec.rb +188 -0
- data/spec/api_client_spec.rb +191 -0
- data/spec/configuration_spec.rb +38 -0
- data/spec/models/action_details_minimal_spec.rb +76 -0
- data/spec/models/action_details_spec.rb +88 -0
- data/spec/models/action_execution_req_dto_spec.rb +58 -0
- data/spec/models/action_execution_res_dto_spec.rb +40 -0
- data/spec/models/action_log_data_spec.rb +70 -0
- data/spec/models/action_metadata_spec.rb +88 -0
- data/spec/models/action_metadata_type_spec.rb +25 -0
- data/spec/models/actions_controller_v1_spec.rb +28 -0
- data/spec/models/actions_list_response_dto_spec.rb +40 -0
- data/spec/models/actions_minimal_list_response_dto_spec.rb +40 -0
- data/spec/models/actions_query_dto_spec.rb +82 -0
- data/spec/models/active_trigger_instance_spec.rb +70 -0
- data/spec/models/active_triggers_res_dto_spec.rb +34 -0
- data/spec/models/add_repo_url_req_dto_spec.rb +28 -0
- data/spec/models/add_repo_url_res_dto_spec.rb +28 -0
- data/spec/models/add_tools_req_dto_spec.rb +40 -0
- data/spec/models/add_tools_request_dto_spec.rb +40 -0
- data/spec/models/api_key_res_dto_spec.rb +52 -0
- data/spec/models/app_info_response_dto_spec.rb +70 -0
- data/spec/models/app_list_res_dto_spec.rb +34 -0
- data/spec/models/app_query_dto_spec.rb +28 -0
- data/spec/models/auth_config_dto_spec.rb +34 -0
- data/spec/models/cli_query_dto_spec.rb +34 -0
- data/spec/models/connected_account_response_dto_spec.rb +82 -0
- data/spec/models/connection_params_for_account_spec.rb +100 -0
- data/spec/models/connection_params_headers_spec.rb +34 -0
- data/spec/models/connection_params_spec.rb +118 -0
- data/spec/models/connection_with_app_data_created_at_spec.rb +25 -0
- data/spec/models/connection_with_app_data_spec.rb +100 -0
- data/spec/models/connector_list_item_dto_created_at_spec.rb +25 -0
- data/spec/models/connector_list_item_dto_spec.rb +94 -0
- data/spec/models/connector_list_item_dto_updated_at_spec.rb +25 -0
- data/spec/models/create_connector_payload_dto_spec.rb +58 -0
- data/spec/models/create_connector_payload_dto_use_composio_auth_spec.rb +22 -0
- data/spec/models/delete_api_key_req_dto_spec.rb +28 -0
- data/spec/models/delete_api_key_response_dto_spec.rb +28 -0
- data/spec/models/delete_row_apidto_spec.rb +34 -0
- data/spec/models/delete_tools_req_dto_spec.rb +28 -0
- data/spec/models/delete_tools_res_dto_spec.rb +28 -0
- data/spec/models/direct_execute_req_dto_spec.rb +46 -0
- data/spec/models/enable_trigger_body_dto_spec.rb +28 -0
- data/spec/models/enable_trigger_params_dto_spec.rb +34 -0
- data/spec/models/execute_action_res_dto_spec.rb +34 -0
- data/spec/models/generate_api_key_req_dto_spec.rb +28 -0
- data/spec/models/generate_cli_session_req_dto_spec.rb +28 -0
- data/spec/models/generate_cli_session_res_dto_spec.rb +28 -0
- data/spec/models/get_active_triggers_query_dto_spec.rb +64 -0
- data/spec/models/get_cli_session_res_dto_spec.rb +34 -0
- data/spec/models/get_connections_query_dto_spec.rb +76 -0
- data/spec/models/get_connections_response_dto_spec.rb +40 -0
- data/spec/models/get_connections_result_spec.rb +34 -0
- data/spec/models/get_connector_info_res_dto_spec.rb +106 -0
- data/spec/models/get_connector_list_res_dto_spec.rb +40 -0
- data/spec/models/get_logs_dto_spec.rb +70 -0
- data/spec/models/get_logs_query_dto_spec.rb +46 -0
- data/spec/models/get_trigger_params_dto_spec.rb +28 -0
- data/spec/models/get_trigger_response_dto_spec.rb +34 -0
- data/spec/models/handle_trigger_body_dto_spec.rb +28 -0
- data/spec/models/handle_trigger_params_dto_spec.rb +34 -0
- data/spec/models/identify_client_req_dto_spec.rb +34 -0
- data/spec/models/identify_client_res_dto_spec.rb +40 -0
- data/spec/models/initiate_connection_payload_dto_spec.rb +46 -0
- data/spec/models/initiate_connection_response_spec.rb +34 -0
- data/spec/models/invite_member_req_dto_spec.rb +40 -0
- data/spec/models/job_status_spec.rb +22 -0
- data/spec/models/list_triggers_query_dto_spec.rb +46 -0
- data/spec/models/logout_res_dto_spec.rb +28 -0
- data/spec/models/logs_res_dto_spec.rb +34 -0
- data/spec/models/magic_link_req_dto_spec.rb +34 -0
- data/spec/models/magic_link_res_dto_spec.rb +28 -0
- data/spec/models/member_res_dto_spec.rb +52 -0
- data/spec/models/meta_app_spec.rb +28 -0
- data/spec/models/meta_spec.rb +28 -0
- data/spec/models/metadata_query_dto_spec.rb +28 -0
- data/spec/models/metadata_req_dto_spec.rb +34 -0
- data/spec/models/o_auth2_callback_query_dto_spec.rb +28 -0
- data/spec/models/open_api_spec_list_res_dto_spec.rb +94 -0
- data/spec/models/page_info_dto_spec.rb +40 -0
- data/spec/models/page_info_spec.rb +46 -0
- data/spec/models/patch_connector_req_dto_spec.rb +34 -0
- data/spec/models/patch_connector_res_dto_spec.rb +28 -0
- data/spec/models/proxy_execution_req_dto_spec.rb +34 -0
- data/spec/models/redirect_uri_dto_spec.rb +28 -0
- data/spec/models/set_callback_url_body_dto_spec.rb +28 -0
- data/spec/models/single_app_info_res_dto_spec.rb +118 -0
- data/spec/models/single_trigger_res_dto_spec.rb +76 -0
- data/spec/models/status_spec.rb +22 -0
- data/spec/models/switch_trigger_status_body_dto_spec.rb +28 -0
- data/spec/models/switch_trigger_status_params_dto_spec.rb +28 -0
- data/spec/models/time_spec.rb +22 -0
- data/spec/models/toggle_connected_account_response_dto_spec.rb +28 -0
- data/spec/models/toggle_trigger_state_response_dto_spec.rb +28 -0
- data/spec/models/tools_execute_req_dto_spec.rb +58 -0
- data/spec/models/track_client_req_dto_spec.rb +40 -0
- data/spec/models/track_client_res_dto_spec.rb +28 -0
- data/spec/models/trigger_config_spec.rb +34 -0
- data/spec/models/trigger_instance_params_dto_spec.rb +28 -0
- data/spec/models/trigger_log_data_spec.rb +70 -0
- data/spec/models/trigger_log_item_dto_spec.rb +82 -0
- data/spec/models/trigger_logs_res_dto_spec.rb +34 -0
- data/spec/models/trigger_metadata_dto_spec.rb +82 -0
- data/spec/models/trigger_metadata_spec.rb +94 -0
- data/spec/models/trigger_metadata_type_spec.rb +25 -0
- data/spec/models/trigger_res_dto_spec.rb +100 -0
- data/spec/models/trigger_response_dto_spec.rb +40 -0
- data/spec/models/trigger_toggle_info_response_dto_spec.rb +28 -0
- data/spec/models/triggers_enabled_toggle_req_dto_spec.rb +28 -0
- data/spec/models/triggers_enabled_toggle_res_dto_spec.rb +28 -0
- data/spec/models/type_spec.rb +22 -0
- data/spec/models/user_git_user_info_spec.rb +34 -0
- data/spec/models/verify_cli_code_res_dto_spec.rb +40 -0
- data/spec/models/verify_magic_link_data_dto_spec.rb +46 -0
- data/spec/models/verify_magic_link_req_dto_spec.rb +28 -0
- data/spec/models/verify_magic_link_res_dto_spec.rb +34 -0
- data/spec/models/webhook_url_response_dto_spec.rb +34 -0
- data/spec/simple_test_spec.rb +52 -0
- data/spec/spec_helper.rb +107 -0
- metadata +504 -0
@@ -0,0 +1,230 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Composio
|
13
|
+
# User Git information
|
14
|
+
class UserGitUserInfo
|
15
|
+
attr_accessor :name
|
16
|
+
|
17
|
+
attr_accessor :email
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'name' => :'name',
|
23
|
+
:'email' => :'email'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'name' => :'String',
|
36
|
+
:'email' => :'String'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::UserGitUserInfo` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::UserGitUserInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'name')
|
62
|
+
self.name = attributes[:'name']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'email')
|
66
|
+
self.email = attributes[:'email']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
if @email.nil?
|
75
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
76
|
+
end
|
77
|
+
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
return false if @email.nil?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
name == o.name &&
|
94
|
+
email == o.email
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[name, email].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :Boolean
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = Composio.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
@@ -0,0 +1,251 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Composio
|
13
|
+
class VerifyCLICodeResDTO
|
14
|
+
# The client ID
|
15
|
+
attr_accessor :client_id
|
16
|
+
|
17
|
+
# The CLI code
|
18
|
+
attr_accessor :cli_code
|
19
|
+
|
20
|
+
# The API key associated with the client
|
21
|
+
attr_accessor :api_key
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'client_id' => :'clientId',
|
27
|
+
:'cli_code' => :'cliCode',
|
28
|
+
:'api_key' => :'apiKey'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'client_id' => :'String',
|
41
|
+
:'cli_code' => :'String',
|
42
|
+
:'api_key' => :'String'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::VerifyCLICodeResDTO` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::VerifyCLICodeResDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'client_id')
|
68
|
+
self.client_id = attributes[:'client_id']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'cli_code')
|
72
|
+
self.cli_code = attributes[:'cli_code']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.key?(:'api_key')
|
76
|
+
self.api_key = attributes[:'api_key']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
if @client_id.nil?
|
85
|
+
invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
|
86
|
+
end
|
87
|
+
|
88
|
+
if @cli_code.nil?
|
89
|
+
invalid_properties.push('invalid value for "cli_code", cli_code cannot be nil.')
|
90
|
+
end
|
91
|
+
|
92
|
+
if @api_key.nil?
|
93
|
+
invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
|
94
|
+
end
|
95
|
+
|
96
|
+
invalid_properties
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
def valid?
|
102
|
+
return false if @client_id.nil?
|
103
|
+
return false if @cli_code.nil?
|
104
|
+
return false if @api_key.nil?
|
105
|
+
true
|
106
|
+
end
|
107
|
+
|
108
|
+
# Checks equality by comparing each attribute.
|
109
|
+
# @param [Object] Object to be compared
|
110
|
+
def ==(o)
|
111
|
+
return true if self.equal?(o)
|
112
|
+
self.class == o.class &&
|
113
|
+
client_id == o.client_id &&
|
114
|
+
cli_code == o.cli_code &&
|
115
|
+
api_key == o.api_key
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[client_id, cli_code, api_key].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
new.build_from_hash(attributes)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
attributes = attributes.transform_keys(&:to_sym)
|
143
|
+
self.class.openapi_types.each_pair do |key, type|
|
144
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
145
|
+
self.send("#{key}=", nil)
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
147
|
+
# check to ensure the input is an array given that the attribute
|
148
|
+
# is documented as an array but the input is not
|
149
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
150
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
151
|
+
end
|
152
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
153
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
self
|
158
|
+
end
|
159
|
+
|
160
|
+
# Deserializes the data based on type
|
161
|
+
# @param string type Data type
|
162
|
+
# @param string value Value to be deserialized
|
163
|
+
# @return [Object] Deserialized data
|
164
|
+
def _deserialize(type, value)
|
165
|
+
case type.to_sym
|
166
|
+
when :Time
|
167
|
+
Time.parse(value)
|
168
|
+
when :Date
|
169
|
+
Date.parse(value)
|
170
|
+
when :String
|
171
|
+
value.to_s
|
172
|
+
when :Integer
|
173
|
+
value.to_i
|
174
|
+
when :Float
|
175
|
+
value.to_f
|
176
|
+
when :Boolean
|
177
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
178
|
+
true
|
179
|
+
else
|
180
|
+
false
|
181
|
+
end
|
182
|
+
when :Object
|
183
|
+
# generic object (usually a Hash), return directly
|
184
|
+
value
|
185
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
186
|
+
inner_type = Regexp.last_match[:inner_type]
|
187
|
+
value.map { |v| _deserialize(inner_type, v) }
|
188
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
189
|
+
k_type = Regexp.last_match[:k_type]
|
190
|
+
v_type = Regexp.last_match[:v_type]
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each do |k, v|
|
193
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
else # model
|
197
|
+
# models (e.g. Pet) or oneOf
|
198
|
+
klass = Composio.const_get(type)
|
199
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the string representation of the object
|
204
|
+
# @return [String] String presentation of the object
|
205
|
+
def to_s
|
206
|
+
to_hash.to_s
|
207
|
+
end
|
208
|
+
|
209
|
+
# to_body is an alias to to_hash (backward compatibility)
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
211
|
+
def to_body
|
212
|
+
to_hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the object in the form of hash
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
217
|
+
def to_hash
|
218
|
+
hash = {}
|
219
|
+
self.class.attribute_map.each_pair do |attr, param|
|
220
|
+
value = self.send(attr)
|
221
|
+
if value.nil?
|
222
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
223
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
224
|
+
end
|
225
|
+
|
226
|
+
hash[param] = _to_hash(value)
|
227
|
+
end
|
228
|
+
hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Outputs non-array value in the form of hash
|
232
|
+
# For object, use to_hash. Otherwise, just return the value
|
233
|
+
# @param [Object] value Any valid value
|
234
|
+
# @return [Hash] Returns the value in the form of hash
|
235
|
+
def _to_hash(value)
|
236
|
+
if value.is_a?(Array)
|
237
|
+
value.compact.map { |v| _to_hash(v) }
|
238
|
+
elsif value.is_a?(Hash)
|
239
|
+
{}.tap do |hash|
|
240
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
241
|
+
end
|
242
|
+
elsif value.respond_to? :to_hash
|
243
|
+
value.to_hash
|
244
|
+
else
|
245
|
+
value
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|
250
|
+
|
251
|
+
end
|