carbon_ruby_sdk 0.2.34 → 0.2.36
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +460 -2
- data/lib/carbon_ruby_sdk/api/crm_api.rb +909 -0
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +298 -0
- data/lib/carbon_ruby_sdk/models/account.rb +398 -0
- data/lib/carbon_ruby_sdk/models/account_filters.rb +226 -0
- data/lib/carbon_ruby_sdk/models/account_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/accounts_order_by.rb +39 -0
- data/lib/carbon_ruby_sdk/models/accounts_order_by_nullable.rb +39 -0
- data/lib/carbon_ruby_sdk/models/accounts_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/address.rb +276 -0
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +32 -6
- data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +245 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +379 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_get_file_input.rb +226 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/base_includes.rb +36 -0
- data/lib/carbon_ruby_sdk/models/contact.rb +434 -0
- data/lib/carbon_ruby_sdk/models/contact_filters.rb +236 -0
- data/lib/carbon_ruby_sdk/models/contacts_order_by.rb +39 -0
- data/lib/carbon_ruby_sdk/models/contacts_order_by_nullable.rb +39 -0
- data/lib/carbon_ruby_sdk/models/contacts_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/contacts_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/email.rb +230 -0
- data/lib/carbon_ruby_sdk/models/event.rb +370 -0
- data/lib/carbon_ruby_sdk/models/lead.rb +468 -0
- data/lib/carbon_ruby_sdk/models/lead_filters.rb +246 -0
- data/lib/carbon_ruby_sdk/models/leads_order_by.rb +38 -0
- data/lib/carbon_ruby_sdk/models/leads_order_by_nullable.rb +38 -0
- data/lib/carbon_ruby_sdk/models/leads_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/leads_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +250 -0
- data/lib/carbon_ruby_sdk/models/opportunities_order_by.rb +40 -0
- data/lib/carbon_ruby_sdk/models/opportunities_order_by_nullable.rb +40 -0
- data/lib/carbon_ruby_sdk/models/opportunities_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/opportunities_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/opportunity.rb +400 -0
- data/lib/carbon_ruby_sdk/models/opportunity_filters.rb +246 -0
- data/lib/carbon_ruby_sdk/models/opportunity_status.rb +36 -0
- data/lib/carbon_ruby_sdk/models/opportunity_status_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/order_dir_v2_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/partial_account.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_account_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_contact.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_contact_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_owner.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_owner_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/phone_number.rb +230 -0
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +1 -5
- data/lib/carbon_ruby_sdk/models/task.rb +346 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +47 -0
- data/spec/api/crm_api_spec.rb +129 -0
- data/spec/api/integrations_api_spec.rb +24 -0
- data/spec/models/account_filters_spec.rb +34 -0
- data/spec/models/account_response_spec.rb +40 -0
- data/spec/models/account_spec.rb +118 -0
- data/spec/models/accounts_order_by_nullable_spec.rb +22 -0
- data/spec/models/accounts_order_by_spec.rb +22 -0
- data/spec/models/accounts_request_spec.rb +70 -0
- data/spec/models/address_spec.rb +64 -0
- data/spec/models/authentication_property_spec.rb +12 -0
- data/spec/models/azure_blob_auth_request_spec.rb +40 -0
- data/spec/models/azure_blob_file_sync_input_spec.rb +112 -0
- data/spec/models/azure_blob_get_file_input_spec.rb +34 -0
- data/spec/models/azure_blob_storage_authentication_spec.rb +40 -0
- data/spec/models/base_includes_spec.rb +22 -0
- data/spec/models/contact_filters_spec.rb +40 -0
- data/spec/models/contact_spec.rb +136 -0
- data/spec/models/contacts_order_by_nullable_spec.rb +22 -0
- data/spec/models/contacts_order_by_spec.rb +22 -0
- data/spec/models/contacts_request_spec.rb +70 -0
- data/spec/models/contacts_response_spec.rb +40 -0
- data/spec/models/email_spec.rb +34 -0
- data/spec/models/event_spec.rb +106 -0
- data/spec/models/lead_filters_spec.rb +46 -0
- data/spec/models/lead_spec.rb +154 -0
- data/spec/models/leads_order_by_nullable_spec.rb +22 -0
- data/spec/models/leads_order_by_spec.rb +22 -0
- data/spec/models/leads_request_spec.rb +70 -0
- data/spec/models/leads_response_spec.rb +40 -0
- data/spec/models/one_drive_authentication_spec.rb +46 -0
- data/spec/models/opportunities_order_by_nullable_spec.rb +22 -0
- data/spec/models/opportunities_order_by_spec.rb +22 -0
- data/spec/models/opportunities_request_spec.rb +70 -0
- data/spec/models/opportunities_response_spec.rb +40 -0
- data/spec/models/opportunity_filters_spec.rb +46 -0
- data/spec/models/opportunity_spec.rb +124 -0
- data/spec/models/opportunity_status_nullable_spec.rb +22 -0
- data/spec/models/opportunity_status_spec.rb +22 -0
- data/spec/models/order_dir_v2_nullable_spec.rb +22 -0
- data/spec/models/partial_account_nullable_spec.rb +28 -0
- data/spec/models/partial_account_spec.rb +28 -0
- data/spec/models/partial_contact_nullable_spec.rb +28 -0
- data/spec/models/partial_contact_spec.rb +28 -0
- data/spec/models/partial_owner_nullable_spec.rb +28 -0
- data/spec/models/partial_owner_spec.rb +28 -0
- data/spec/models/phone_number_spec.rb +34 -0
- data/spec/models/sent_webhook_payload_spec.rb +1 -1
- data/spec/models/task_spec.rb +94 -0
- metadata +137 -2
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'date'
|
|
10
|
+
require 'time'
|
|
11
|
+
|
|
12
|
+
module Carbon
|
|
13
|
+
class Address
|
|
14
|
+
attr_accessor :street_1
|
|
15
|
+
|
|
16
|
+
attr_accessor :street_2
|
|
17
|
+
|
|
18
|
+
attr_accessor :city
|
|
19
|
+
|
|
20
|
+
attr_accessor :state
|
|
21
|
+
|
|
22
|
+
attr_accessor :postal_code
|
|
23
|
+
|
|
24
|
+
attr_accessor :country
|
|
25
|
+
|
|
26
|
+
attr_accessor :address_type
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'street_1' => :'street_1',
|
|
32
|
+
:'street_2' => :'street_2',
|
|
33
|
+
:'city' => :'city',
|
|
34
|
+
:'state' => :'state',
|
|
35
|
+
:'postal_code' => :'postal_code',
|
|
36
|
+
:'country' => :'country',
|
|
37
|
+
:'address_type' => :'address_type'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'street_1' => :'String',
|
|
50
|
+
:'street_2' => :'String',
|
|
51
|
+
:'city' => :'String',
|
|
52
|
+
:'state' => :'String',
|
|
53
|
+
:'postal_code' => :'String',
|
|
54
|
+
:'country' => :'String',
|
|
55
|
+
:'address_type' => :'String'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# List of attributes with nullable: true
|
|
60
|
+
def self.openapi_nullable
|
|
61
|
+
Set.new([
|
|
62
|
+
:'street_1',
|
|
63
|
+
:'street_2',
|
|
64
|
+
:'city',
|
|
65
|
+
:'state',
|
|
66
|
+
:'postal_code',
|
|
67
|
+
:'country',
|
|
68
|
+
:'address_type'
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::Address` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::Address`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'street_1')
|
|
88
|
+
self.street_1 = attributes[:'street_1']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'street_2')
|
|
92
|
+
self.street_2 = attributes[:'street_2']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'city')
|
|
96
|
+
self.city = attributes[:'city']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'state')
|
|
100
|
+
self.state = attributes[:'state']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'postal_code')
|
|
104
|
+
self.postal_code = attributes[:'postal_code']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'country')
|
|
108
|
+
self.country = attributes[:'country']
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'address_type')
|
|
112
|
+
self.address_type = attributes[:'address_type']
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
117
|
+
# @return Array for valid properties with the reasons
|
|
118
|
+
def list_invalid_properties
|
|
119
|
+
invalid_properties = Array.new
|
|
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
|
+
true
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Checks equality by comparing each attribute.
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
street_1 == o.street_1 &&
|
|
135
|
+
street_2 == o.street_2 &&
|
|
136
|
+
city == o.city &&
|
|
137
|
+
state == o.state &&
|
|
138
|
+
postal_code == o.postal_code &&
|
|
139
|
+
country == o.country &&
|
|
140
|
+
address_type == o.address_type
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @see the `==` method
|
|
144
|
+
# @param [Object] Object to be compared
|
|
145
|
+
def eql?(o)
|
|
146
|
+
self == o
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Calculates hash code according to all attributes.
|
|
150
|
+
# @return [Integer] Hash code
|
|
151
|
+
def hash
|
|
152
|
+
[street_1, street_2, city, state, postal_code, country, address_type].hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Builds the object from hash
|
|
156
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
157
|
+
# @return [Object] Returns the model itself
|
|
158
|
+
def self.build_from_hash(attributes)
|
|
159
|
+
new.build_from_hash(attributes)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Builds the object from hash
|
|
163
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
164
|
+
# @return [Object] Returns the model itself
|
|
165
|
+
def build_from_hash(attributes)
|
|
166
|
+
return nil unless attributes.is_a?(Hash)
|
|
167
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
168
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
169
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
170
|
+
self.send("#{key}=", nil)
|
|
171
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
172
|
+
# check to ensure the input is an array given that the attribute
|
|
173
|
+
# is documented as an array but the input is not
|
|
174
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
175
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
176
|
+
end
|
|
177
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
178
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
self
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Deserializes the data based on type
|
|
186
|
+
# @param string type Data type
|
|
187
|
+
# @param string value Value to be deserialized
|
|
188
|
+
# @return [Object] Deserialized data
|
|
189
|
+
def _deserialize(type, value)
|
|
190
|
+
case type.to_sym
|
|
191
|
+
when :Time
|
|
192
|
+
Time.parse(value)
|
|
193
|
+
when :Date
|
|
194
|
+
Date.parse(value)
|
|
195
|
+
when :String
|
|
196
|
+
value.to_s
|
|
197
|
+
when :Integer
|
|
198
|
+
value.to_i
|
|
199
|
+
when :Float
|
|
200
|
+
value.to_f
|
|
201
|
+
when :Boolean
|
|
202
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
203
|
+
true
|
|
204
|
+
else
|
|
205
|
+
false
|
|
206
|
+
end
|
|
207
|
+
when :Object
|
|
208
|
+
# generic object (usually a Hash), return directly
|
|
209
|
+
value
|
|
210
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
211
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
212
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
213
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
214
|
+
k_type = Regexp.last_match[:k_type]
|
|
215
|
+
v_type = Regexp.last_match[:v_type]
|
|
216
|
+
{}.tap do |hash|
|
|
217
|
+
value.each do |k, v|
|
|
218
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
else # model
|
|
222
|
+
# models (e.g. Pet) or oneOf
|
|
223
|
+
klass = Carbon.const_get(type)
|
|
224
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the string representation of the object
|
|
229
|
+
# @return [String] String presentation of the object
|
|
230
|
+
def to_s
|
|
231
|
+
to_hash.to_s
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
|
236
|
+
def to_body
|
|
237
|
+
to_hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Returns the object in the form of hash
|
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
|
242
|
+
def to_hash
|
|
243
|
+
hash = {}
|
|
244
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
245
|
+
value = self.send(attr)
|
|
246
|
+
if value.nil?
|
|
247
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
248
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
hash[param] = _to_hash(value)
|
|
252
|
+
end
|
|
253
|
+
hash
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Outputs non-array value in the form of hash
|
|
257
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
258
|
+
# @param [Object] value Any valid value
|
|
259
|
+
# @return [Hash] Returns the value in the form of hash
|
|
260
|
+
def _to_hash(value)
|
|
261
|
+
if value.is_a?(Array)
|
|
262
|
+
value.compact.map { |v| _to_hash(v) }
|
|
263
|
+
elsif value.is_a?(Hash)
|
|
264
|
+
{}.tap do |hash|
|
|
265
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
266
|
+
end
|
|
267
|
+
elsif value.respond_to? :to_hash
|
|
268
|
+
value.to_hash
|
|
269
|
+
else
|
|
270
|
+
value
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
end
|
|
@@ -44,6 +44,10 @@ module Carbon
|
|
|
44
44
|
# You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
|
|
45
45
|
attr_accessor :endpoint_url
|
|
46
46
|
|
|
47
|
+
attr_accessor :account_name
|
|
48
|
+
|
|
49
|
+
attr_accessor :account_key
|
|
50
|
+
|
|
47
51
|
attr_accessor :instance_subdomain
|
|
48
52
|
|
|
49
53
|
attr_accessor :client_id
|
|
@@ -73,6 +77,8 @@ module Carbon
|
|
|
73
77
|
:'access_key' => :'access_key',
|
|
74
78
|
:'access_key_secret' => :'access_key_secret',
|
|
75
79
|
:'endpoint_url' => :'endpoint_url',
|
|
80
|
+
:'account_name' => :'account_name',
|
|
81
|
+
:'account_key' => :'account_key',
|
|
76
82
|
:'instance_subdomain' => :'instance_subdomain',
|
|
77
83
|
:'client_id' => :'client_id',
|
|
78
84
|
:'client_secret' => :'client_secret',
|
|
@@ -105,6 +111,8 @@ module Carbon
|
|
|
105
111
|
:'access_key' => :'String',
|
|
106
112
|
:'access_key_secret' => :'String',
|
|
107
113
|
:'endpoint_url' => :'String',
|
|
114
|
+
:'account_name' => :'String',
|
|
115
|
+
:'account_key' => :'String',
|
|
108
116
|
:'instance_subdomain' => :'String',
|
|
109
117
|
:'client_id' => :'String',
|
|
110
118
|
:'client_secret' => :'String',
|
|
@@ -118,6 +126,7 @@ module Carbon
|
|
|
118
126
|
Set.new([
|
|
119
127
|
:'source',
|
|
120
128
|
:'refresh_token',
|
|
129
|
+
:'tenant_name',
|
|
121
130
|
:'endpoint_url',
|
|
122
131
|
])
|
|
123
132
|
end
|
|
@@ -125,6 +134,7 @@ module Carbon
|
|
|
125
134
|
# List of class defined in anyOf (OpenAPI v3)
|
|
126
135
|
def self.openapi_any_of
|
|
127
136
|
[
|
|
137
|
+
:'AzureBlobStorageAuthentication',
|
|
128
138
|
:'ConfluenceAuthentication',
|
|
129
139
|
:'FreskdeskAuthentication',
|
|
130
140
|
:'GitbookAuthetication',
|
|
@@ -133,6 +143,7 @@ module Carbon
|
|
|
133
143
|
:'GuruAuthentication',
|
|
134
144
|
:'NotionAuthentication',
|
|
135
145
|
:'OAuthAuthentication',
|
|
146
|
+
:'OneDriveAuthentication',
|
|
136
147
|
:'S3Authentication',
|
|
137
148
|
:'SalesforceAuthentication',
|
|
138
149
|
:'ServiceNowAuthentication',
|
|
@@ -221,6 +232,14 @@ module Carbon
|
|
|
221
232
|
self.endpoint_url = attributes[:'endpoint_url']
|
|
222
233
|
end
|
|
223
234
|
|
|
235
|
+
if attributes.key?(:'account_name')
|
|
236
|
+
self.account_name = attributes[:'account_name']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'account_key')
|
|
240
|
+
self.account_key = attributes[:'account_key']
|
|
241
|
+
end
|
|
242
|
+
|
|
224
243
|
if attributes.key?(:'instance_subdomain')
|
|
225
244
|
self.instance_subdomain = attributes[:'instance_subdomain']
|
|
226
245
|
end
|
|
@@ -254,10 +273,6 @@ module Carbon
|
|
|
254
273
|
invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
|
|
255
274
|
end
|
|
256
275
|
|
|
257
|
-
if @tenant_name.nil?
|
|
258
|
-
invalid_properties.push('invalid value for "tenant_name", tenant_name cannot be nil.')
|
|
259
|
-
end
|
|
260
|
-
|
|
261
276
|
if @site_name.nil?
|
|
262
277
|
invalid_properties.push('invalid value for "site_name", site_name cannot be nil.')
|
|
263
278
|
end
|
|
@@ -298,6 +313,14 @@ module Carbon
|
|
|
298
313
|
invalid_properties.push('invalid value for "access_key_secret", access_key_secret cannot be nil.')
|
|
299
314
|
end
|
|
300
315
|
|
|
316
|
+
if @account_name.nil?
|
|
317
|
+
invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
if @account_key.nil?
|
|
321
|
+
invalid_properties.push('invalid value for "account_key", account_key cannot be nil.')
|
|
322
|
+
end
|
|
323
|
+
|
|
301
324
|
if @instance_subdomain.nil?
|
|
302
325
|
invalid_properties.push('invalid value for "instance_subdomain", instance_subdomain cannot be nil.')
|
|
303
326
|
end
|
|
@@ -326,7 +349,6 @@ module Carbon
|
|
|
326
349
|
def valid?
|
|
327
350
|
return false if @access_token.nil?
|
|
328
351
|
return false if @workspace_id.nil?
|
|
329
|
-
return false if @tenant_name.nil?
|
|
330
352
|
return false if @site_name.nil?
|
|
331
353
|
return false if @subdomain.nil?
|
|
332
354
|
return false if @access_token_secret.nil?
|
|
@@ -337,6 +359,8 @@ module Carbon
|
|
|
337
359
|
return false if @api_key.nil?
|
|
338
360
|
return false if @access_key.nil?
|
|
339
361
|
return false if @access_key_secret.nil?
|
|
362
|
+
return false if @account_name.nil?
|
|
363
|
+
return false if @account_key.nil?
|
|
340
364
|
return false if @instance_subdomain.nil?
|
|
341
365
|
return false if @client_id.nil?
|
|
342
366
|
return false if @client_secret.nil?
|
|
@@ -378,6 +402,8 @@ module Carbon
|
|
|
378
402
|
access_key == o.access_key &&
|
|
379
403
|
access_key_secret == o.access_key_secret &&
|
|
380
404
|
endpoint_url == o.endpoint_url &&
|
|
405
|
+
account_name == o.account_name &&
|
|
406
|
+
account_key == o.account_key &&
|
|
381
407
|
instance_subdomain == o.instance_subdomain &&
|
|
382
408
|
client_id == o.client_id &&
|
|
383
409
|
client_secret == o.client_secret &&
|
|
@@ -394,7 +420,7 @@ module Carbon
|
|
|
394
420
|
# Calculates hash code according to all attributes.
|
|
395
421
|
# @return [Integer] Hash code
|
|
396
422
|
def hash
|
|
397
|
-
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, instance_subdomain, client_id, client_secret, redirect_uri, gong_account_email].hash
|
|
423
|
+
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, account_name, account_key, instance_subdomain, client_id, client_secret, redirect_uri, gong_account_email].hash
|
|
398
424
|
end
|
|
399
425
|
|
|
400
426
|
# Builds the object from hash
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Carbon
|
|
3
|
+
|
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
=end
|
|
8
|
+
|
|
9
|
+
require 'date'
|
|
10
|
+
require 'time'
|
|
11
|
+
|
|
12
|
+
module Carbon
|
|
13
|
+
class AzureBlobAuthRequest
|
|
14
|
+
attr_accessor :account_name
|
|
15
|
+
|
|
16
|
+
attr_accessor :account_key
|
|
17
|
+
|
|
18
|
+
attr_accessor :sync_source_items
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'account_name' => :'account_name',
|
|
24
|
+
:'account_key' => :'account_key',
|
|
25
|
+
:'sync_source_items' => :'sync_source_items'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
|
30
|
+
def self.acceptable_attributes
|
|
31
|
+
attribute_map.values
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Attribute type mapping.
|
|
35
|
+
def self.openapi_types
|
|
36
|
+
{
|
|
37
|
+
:'account_name' => :'String',
|
|
38
|
+
:'account_key' => :'String',
|
|
39
|
+
:'sync_source_items' => :'Boolean'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# List of attributes with nullable: true
|
|
44
|
+
def self.openapi_nullable
|
|
45
|
+
Set.new([
|
|
46
|
+
])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
if (!attributes.is_a?(Hash))
|
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::AzureBlobAuthRequest` initialize method"
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
58
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::AzureBlobAuthRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
60
|
+
end
|
|
61
|
+
h[k.to_sym] = v
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'account_name')
|
|
65
|
+
self.account_name = attributes[:'account_name']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'account_key')
|
|
69
|
+
self.account_key = attributes[:'account_key']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'sync_source_items')
|
|
73
|
+
self.sync_source_items = attributes[:'sync_source_items']
|
|
74
|
+
else
|
|
75
|
+
self.sync_source_items = true
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
invalid_properties = Array.new
|
|
83
|
+
if @account_name.nil?
|
|
84
|
+
invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if @account_key.nil?
|
|
88
|
+
invalid_properties.push('invalid value for "account_key", account_key cannot be nil.')
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
invalid_properties
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Check to see if the all the properties in the model are valid
|
|
95
|
+
# @return true if the model is valid
|
|
96
|
+
def valid?
|
|
97
|
+
return false if @account_name.nil?
|
|
98
|
+
return false if @account_key.nil?
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Checks equality by comparing each attribute.
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def ==(o)
|
|
105
|
+
return true if self.equal?(o)
|
|
106
|
+
self.class == o.class &&
|
|
107
|
+
account_name == o.account_name &&
|
|
108
|
+
account_key == o.account_key &&
|
|
109
|
+
sync_source_items == o.sync_source_items
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @see the `==` method
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def eql?(o)
|
|
115
|
+
self == o
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Calculates hash code according to all attributes.
|
|
119
|
+
# @return [Integer] Hash code
|
|
120
|
+
def hash
|
|
121
|
+
[account_name, account_key, sync_source_items].hash
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def self.build_from_hash(attributes)
|
|
128
|
+
new.build_from_hash(attributes)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def build_from_hash(attributes)
|
|
135
|
+
return nil unless attributes.is_a?(Hash)
|
|
136
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
137
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
138
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
139
|
+
self.send("#{key}=", nil)
|
|
140
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
141
|
+
# check to ensure the input is an array given that the attribute
|
|
142
|
+
# is documented as an array but the input is not
|
|
143
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
144
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
145
|
+
end
|
|
146
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
147
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
self
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Deserializes the data based on type
|
|
155
|
+
# @param string type Data type
|
|
156
|
+
# @param string value Value to be deserialized
|
|
157
|
+
# @return [Object] Deserialized data
|
|
158
|
+
def _deserialize(type, value)
|
|
159
|
+
case type.to_sym
|
|
160
|
+
when :Time
|
|
161
|
+
Time.parse(value)
|
|
162
|
+
when :Date
|
|
163
|
+
Date.parse(value)
|
|
164
|
+
when :String
|
|
165
|
+
value.to_s
|
|
166
|
+
when :Integer
|
|
167
|
+
value.to_i
|
|
168
|
+
when :Float
|
|
169
|
+
value.to_f
|
|
170
|
+
when :Boolean
|
|
171
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
172
|
+
true
|
|
173
|
+
else
|
|
174
|
+
false
|
|
175
|
+
end
|
|
176
|
+
when :Object
|
|
177
|
+
# generic object (usually a Hash), return directly
|
|
178
|
+
value
|
|
179
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
180
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
181
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
182
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
183
|
+
k_type = Regexp.last_match[:k_type]
|
|
184
|
+
v_type = Regexp.last_match[:v_type]
|
|
185
|
+
{}.tap do |hash|
|
|
186
|
+
value.each do |k, v|
|
|
187
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
else # model
|
|
191
|
+
# models (e.g. Pet) or oneOf
|
|
192
|
+
klass = Carbon.const_get(type)
|
|
193
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the string representation of the object
|
|
198
|
+
# @return [String] String presentation of the object
|
|
199
|
+
def to_s
|
|
200
|
+
to_hash.to_s
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
|
205
|
+
def to_body
|
|
206
|
+
to_hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the object in the form of hash
|
|
210
|
+
# @return [Hash] Returns the object in the form of hash
|
|
211
|
+
def to_hash
|
|
212
|
+
hash = {}
|
|
213
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
214
|
+
value = self.send(attr)
|
|
215
|
+
if value.nil?
|
|
216
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
217
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
hash[param] = _to_hash(value)
|
|
221
|
+
end
|
|
222
|
+
hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Outputs non-array value in the form of hash
|
|
226
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
227
|
+
# @param [Object] value Any valid value
|
|
228
|
+
# @return [Hash] Returns the value in the form of hash
|
|
229
|
+
def _to_hash(value)
|
|
230
|
+
if value.is_a?(Array)
|
|
231
|
+
value.compact.map { |v| _to_hash(v) }
|
|
232
|
+
elsif value.is_a?(Hash)
|
|
233
|
+
{}.tap do |hash|
|
|
234
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
235
|
+
end
|
|
236
|
+
elsif value.respond_to? :to_hash
|
|
237
|
+
value.to_hash
|
|
238
|
+
else
|
|
239
|
+
value
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
end
|