Class: Carbon::AuthenticationProperty
- Inherits:
-
Object
- Object
- Carbon::AuthenticationProperty
- Defined in:
- lib/carbon_ruby_sdk/models/authentication_property.rb
Instance Attribute Summary collapse
-
#access_key ⇒ Object
Returns the value of attribute access_key.
-
#access_key_secret ⇒ Object
Returns the value of attribute access_key_secret.
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#access_token_secret ⇒ Object
Returns the value of attribute access_token_secret.
-
#account_key ⇒ Object
Returns the value of attribute account_key.
-
#account_name ⇒ Object
Returns the value of attribute account_name.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#endpoint_url ⇒ Object
You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint.
-
#gong_account_email ⇒ Object
Returns the value of attribute gong_account_email.
-
#instance_subdomain ⇒ Object
Returns the value of attribute instance_subdomain.
-
#organization_name ⇒ Object
Returns the value of attribute organization_name.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
-
#site_name ⇒ Object
Returns the value of attribute site_name.
-
#source ⇒ Object
Returns the value of attribute source.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
-
#tenant_name ⇒ Object
Returns the value of attribute tenant_name.
-
#username ⇒ Object
Returns the value of attribute username.
-
#workspace_id ⇒ Object
Returns the value of attribute workspace_id.
-
#zotero_id ⇒ Object
Returns the value of attribute zotero_id.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_any_of ⇒ Object
List of class defined in anyOf (OpenAPI v3).
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AuthenticationProperty
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ AuthenticationProperty
Initializes the object
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 158 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::AuthenticationProperty` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::AuthenticationProperty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'access_token') self.access_token = attributes[:'access_token'] end if attributes.key?(:'refresh_token') self.refresh_token = attributes[:'refresh_token'] end if attributes.key?(:'workspace_id') self.workspace_id = attributes[:'workspace_id'] end if attributes.key?(:'tenant_name') self.tenant_name = attributes[:'tenant_name'] end if attributes.key?(:'site_name') self.site_name = attributes[:'site_name'] end if attributes.key?(:'subdomain') self.subdomain = attributes[:'subdomain'] end if attributes.key?(:'access_token_secret') self.access_token_secret = attributes[:'access_token_secret'] end if attributes.key?(:'username') self.username = attributes[:'username'] end if attributes.key?(:'zotero_id') self.zotero_id = attributes[:'zotero_id'] end if attributes.key?(:'organization_name') self.organization_name = attributes[:'organization_name'] end if attributes.key?(:'domain') self.domain = attributes[:'domain'] end if attributes.key?(:'api_key') self.api_key = attributes[:'api_key'] end if attributes.key?(:'access_key') self.access_key = attributes[:'access_key'] end if attributes.key?(:'access_key_secret') self.access_key_secret = attributes[:'access_key_secret'] end if attributes.key?(:'endpoint_url') self.endpoint_url = attributes[:'endpoint_url'] end if attributes.key?(:'account_name') self.account_name = attributes[:'account_name'] end if attributes.key?(:'account_key') self.account_key = attributes[:'account_key'] end if attributes.key?(:'instance_subdomain') self.instance_subdomain = attributes[:'instance_subdomain'] end if attributes.key?(:'client_id') self.client_id = attributes[:'client_id'] end if attributes.key?(:'client_secret') self.client_secret = attributes[:'client_secret'] end if attributes.key?(:'redirect_uri') self.redirect_uri = attributes[:'redirect_uri'] end if attributes.key?(:'gong_account_email') self.gong_account_email = attributes[:'gong_account_email'] end end |
Instance Attribute Details
#access_key ⇒ Object
Returns the value of attribute access_key.
40 41 42 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 40 def access_key @access_key end |
#access_key_secret ⇒ Object
Returns the value of attribute access_key_secret.
42 43 44 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 42 def access_key_secret @access_key_secret end |
#access_token ⇒ Object
Returns the value of attribute access_token.
16 17 18 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 16 def access_token @access_token end |
#access_token_secret ⇒ Object
Returns the value of attribute access_token_secret.
28 29 30 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 28 def access_token_secret @access_token_secret end |
#account_key ⇒ Object
Returns the value of attribute account_key.
49 50 51 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 49 def account_key @account_key end |
#account_name ⇒ Object
Returns the value of attribute account_name.
47 48 49 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 47 def account_name @account_name end |
#api_key ⇒ Object
Returns the value of attribute api_key.
38 39 40 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 38 def api_key @api_key end |
#client_id ⇒ Object
Returns the value of attribute client_id.
53 54 55 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 53 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
55 56 57 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 55 def client_secret @client_secret end |
#domain ⇒ Object
Returns the value of attribute domain.
36 37 38 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 36 def domain @domain end |
#endpoint_url ⇒ Object
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 46 47 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 45 def endpoint_url @endpoint_url end |
#gong_account_email ⇒ Object
Returns the value of attribute gong_account_email.
59 60 61 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 59 def gong_account_email @gong_account_email end |
#instance_subdomain ⇒ Object
Returns the value of attribute instance_subdomain.
51 52 53 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 51 def instance_subdomain @instance_subdomain end |
#organization_name ⇒ Object
Returns the value of attribute organization_name.
34 35 36 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 34 def organization_name @organization_name end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
57 58 59 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 57 def redirect_uri @redirect_uri end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
18 19 20 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 18 def refresh_token @refresh_token end |
#site_name ⇒ Object
Returns the value of attribute site_name.
24 25 26 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 24 def site_name @site_name end |
#source ⇒ Object
Returns the value of attribute source.
14 15 16 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 14 def source @source end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
26 27 28 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 26 def subdomain @subdomain end |
#tenant_name ⇒ Object
Returns the value of attribute tenant_name.
22 23 24 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 22 def tenant_name @tenant_name end |
#username ⇒ Object
Returns the value of attribute username.
30 31 32 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 30 def username @username end |
#workspace_id ⇒ Object
Returns the value of attribute workspace_id.
20 21 22 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 20 def workspace_id @workspace_id end |
#zotero_id ⇒ Object
Returns the value of attribute zotero_id.
32 33 34 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 32 def zotero_id @zotero_id end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
91 92 93 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 91 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 62 def self.attribute_map { :'source' => :'source', :'access_token' => :'access_token', :'refresh_token' => :'refresh_token', :'workspace_id' => :'workspace_id', :'tenant_name' => :'tenant_name', :'site_name' => :'site_name', :'subdomain' => :'subdomain', :'access_token_secret' => :'access_token_secret', :'username' => :'username', :'zotero_id' => :'zotero_id', :'organization_name' => :'organization_name', :'domain' => :'domain', :'api_key' => :'api_key', :'access_key' => :'access_key', :'access_key_secret' => :'access_key_secret', :'endpoint_url' => :'endpoint_url', :'account_name' => :'account_name', :'account_key' => :'account_key', :'instance_subdomain' => :'instance_subdomain', :'client_id' => :'client_id', :'client_secret' => :'client_secret', :'redirect_uri' => :'redirect_uri', :'gong_account_email' => :'gong_account_email' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
429 430 431 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 429 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_any_of ⇒ Object
List of class defined in anyOf (OpenAPI v3)
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 135 def self.openapi_any_of [ :'AzureBlobStorageAuthentication', :'ConfluenceAuthentication', :'FreskdeskAuthentication', :'GitbookAuthetication', :'GithubAuthentication', :'GongAuthentication', :'GuruAuthentication', :'NotionAuthentication', :'OAuthAuthentication', :'OneDriveAuthentication', :'S3Authentication', :'SalesforceAuthentication', :'ServiceNowAuthentication', :'SharepointAuthentication', :'ZendeskAuthentication', :'ZoteroAuthentication' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
125 126 127 128 129 130 131 132 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 125 def self.openapi_nullable Set.new([ :'refresh_token', :'tenant_name', :'site_name', :'endpoint_url', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 96 def self.openapi_types { :'source' => :'GongAuthenticationSource', :'access_token' => :'String', :'refresh_token' => :'String', :'workspace_id' => :'String', :'tenant_name' => :'String', :'site_name' => :'String', :'subdomain' => :'String', :'access_token_secret' => :'String', :'username' => :'String', :'zotero_id' => :'String', :'organization_name' => :'String', :'domain' => :'String', :'api_key' => :'String', :'access_key' => :'String', :'access_key_secret' => :'String', :'endpoint_url' => :'String', :'account_name' => :'String', :'account_key' => :'String', :'instance_subdomain' => :'String', :'client_id' => :'String', :'client_secret' => :'String', :'redirect_uri' => :'String', :'gong_account_email' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 386 def ==(o) return true if self.equal?(o) self.class == o.class && source == o.source && access_token == o.access_token && refresh_token == o.refresh_token && workspace_id == o.workspace_id && tenant_name == o.tenant_name && site_name == o.site_name && subdomain == o.subdomain && access_token_secret == o.access_token_secret && username == o.username && zotero_id == o.zotero_id && organization_name == o.organization_name && domain == o.domain && api_key == o.api_key && access_key == o.access_key && access_key_secret == o.access_key_secret && endpoint_url == o.endpoint_url && account_name == o.account_name && account_key == o.account_key && instance_subdomain == o.instance_subdomain && client_id == o.client_id && client_secret == o.client_secret && redirect_uri == o.redirect_uri && gong_account_email == o.gong_account_email end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 460 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Carbon.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
531 532 533 534 535 536 537 538 539 540 541 542 543 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 531 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 436 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
416 417 418 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 416 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
422 423 424 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 422 def hash [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 end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 266 def list_invalid_properties invalid_properties = Array.new if @source.nil? invalid_properties.push('invalid value for "source", source cannot be nil.') end if @access_token.nil? invalid_properties.push('invalid value for "access_token", access_token cannot be nil.') end if @workspace_id.nil? invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.') end if @subdomain.nil? invalid_properties.push('invalid value for "subdomain", subdomain cannot be nil.') end if @access_token_secret.nil? invalid_properties.push('invalid value for "access_token_secret", access_token_secret cannot be nil.') end if @username.nil? invalid_properties.push('invalid value for "username", username cannot be nil.') end if @zotero_id.nil? invalid_properties.push('invalid value for "zotero_id", zotero_id cannot be nil.') end if @organization_name.nil? invalid_properties.push('invalid value for "organization_name", organization_name cannot be nil.') end if @domain.nil? invalid_properties.push('invalid value for "domain", domain cannot be nil.') end if @api_key.nil? invalid_properties.push('invalid value for "api_key", api_key cannot be nil.') end if @access_key.nil? invalid_properties.push('invalid value for "access_key", access_key cannot be nil.') end if @access_key_secret.nil? invalid_properties.push('invalid value for "access_key_secret", access_key_secret cannot be nil.') end if @account_name.nil? invalid_properties.push('invalid value for "account_name", account_name cannot be nil.') end if @account_key.nil? invalid_properties.push('invalid value for "account_key", account_key cannot be nil.') end if @instance_subdomain.nil? invalid_properties.push('invalid value for "instance_subdomain", instance_subdomain cannot be nil.') end if @client_id.nil? invalid_properties.push('invalid value for "client_id", client_id cannot be nil.') end if @client_secret.nil? invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.') end if @redirect_uri.nil? invalid_properties.push('invalid value for "redirect_uri", redirect_uri cannot be nil.') end if @gong_account_email.nil? invalid_properties.push('invalid value for "gong_account_email", gong_account_email cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
507 508 509 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 507 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 513 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
501 502 503 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 501 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/carbon_ruby_sdk/models/authentication_property.rb', line 349 def valid? return false if @source.nil? return false if @access_token.nil? return false if @workspace_id.nil? return false if @subdomain.nil? return false if @access_token_secret.nil? return false if @username.nil? return false if @zotero_id.nil? return false if @organization_name.nil? return false if @domain.nil? return false if @api_key.nil? return false if @access_key.nil? return false if @access_key_secret.nil? return false if @account_name.nil? return false if @account_key.nil? return false if @instance_subdomain.nil? return false if @client_id.nil? return false if @client_secret.nil? return false if @redirect_uri.nil? return false if @gong_account_email.nil? _any_of_found = false self.class.openapi_any_of.each do |_class| _any_of = Carbon.const_get(_class).build_from_hash(self.to_hash) if _any_of.valid? _any_of_found = true end end if !_any_of_found return false end true end |