Class: Vapi::UpdateGoogleCalendarOAuth2AuthorizationCredentialDto
- Inherits:
-
Object
- Object
- Vapi::UpdateGoogleCalendarOAuth2AuthorizationCredentialDto
- Defined in:
- lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#authorization_id ⇒ String
readonly
The authorization ID for the OAuth2 authorization.
-
#name ⇒ String
readonly
This is the name of credential.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::UpdateGoogleCalendarOAuth2AuthorizationCredentialDto
Deserialize a JSON object to an instance of UpdateGoogleCalendarOAuth2AuthorizationCredentialDto.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(authorization_id: OMIT, name: OMIT, additional_properties: nil) ⇒ Vapi::UpdateGoogleCalendarOAuth2AuthorizationCredentialDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of UpdateGoogleCalendarOAuth2AuthorizationCredentialDto to a JSON object.
Constructor Details
#initialize(authorization_id: OMIT, name: OMIT, additional_properties: nil) ⇒ Vapi::UpdateGoogleCalendarOAuth2AuthorizationCredentialDto
24 25 26 27 28 29 30 31 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 24 def initialize(authorization_id: OMIT, name: OMIT, additional_properties: nil) = if != OMIT @name = name if name != OMIT @additional_properties = additional_properties @_field_set = { "authorizationId": , "name": name }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
13 14 15 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 13 def additional_properties @additional_properties end |
#authorization_id ⇒ String (readonly)
Returns The authorization ID for the OAuth2 authorization.
9 10 11 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 9 def end |
#name ⇒ String (readonly)
Returns This is the name of credential. This is just for your reference.
11 12 13 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 11 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::UpdateGoogleCalendarOAuth2AuthorizationCredentialDto
Deserialize a JSON object to an instance of
UpdateGoogleCalendarOAuth2AuthorizationCredentialDto
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 38 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) = parsed_json["authorizationId"] name = parsed_json["name"] new( authorization_id: , name: name, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
64 65 66 67 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 64 def self.validate_raw(obj:) obj.&.is_a?(String) != false || raise("Passed value for field obj.authorization_id is not the expected type, validation failed.") obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of UpdateGoogleCalendarOAuth2AuthorizationCredentialDto to
a JSON object
54 55 56 |
# File 'lib/vapi_server_sdk/types/update_google_calendar_o_auth_2_authorization_credential_dto.rb', line 54 def to_json(*_args) @_field_set&.to_json end |