Class: Vapi::LangfuseCredential
- Inherits:
-
Object
- Object
- Vapi::LangfuseCredential
- Defined in:
- lib/vapi_server_sdk/types/langfuse_credential.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#api_key ⇒ String
readonly
The secret key for Langfuse project.
-
#api_url ⇒ String
readonly
The host URL for Langfuse project.
-
#created_at ⇒ DateTime
readonly
This is the ISO 8601 date-time string of when the credential was created.
-
#id ⇒ String
readonly
This is the unique identifier for the credential.
-
#name ⇒ String
readonly
This is the name of credential.
-
#org_id ⇒ String
readonly
This is the unique identifier for the org that this credential belongs to.
- #provider ⇒ String readonly
-
#public_key ⇒ String
readonly
The public key for Langfuse project.
-
#updated_at ⇒ DateTime
readonly
This is the ISO 8601 date-time string of when the assistant was last updated.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::LangfuseCredential
Deserialize a JSON object to an instance of LangfuseCredential.
-
.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(provider:, public_key:, api_key:, api_url:, id:, org_id:, created_at:, updated_at:, name: OMIT, additional_properties: nil) ⇒ Vapi::LangfuseCredential constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of LangfuseCredential to a JSON object.
Constructor Details
#initialize(provider:, public_key:, api_key:, api_url:, id:, org_id:, created_at:, updated_at:, name: OMIT, additional_properties: nil) ⇒ Vapi::LangfuseCredential
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 48 def initialize(provider:, public_key:, api_key:, api_url:, id:, org_id:, created_at:, updated_at:, name: OMIT, additional_properties: nil) @provider = provider @public_key = public_key @api_key = api_key @api_url = api_url @id = id @org_id = org_id @created_at = created_at @updated_at = updated_at @name = name if name != OMIT @additional_properties = additional_properties @_field_set = { "provider": provider, "publicKey": public_key, "apiKey": api_key, "apiUrl": api_url, "id": id, "orgId": org_id, "createdAt": created_at, "updatedAt": updated_at, "name": name }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
29 30 31 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 29 def additional_properties @additional_properties end |
#api_key ⇒ String (readonly)
15 16 17 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 15 def api_key @api_key end |
#api_url ⇒ String (readonly)
17 18 19 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 17 def api_url @api_url end |
#created_at ⇒ DateTime (readonly)
23 24 25 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 23 def created_at @created_at end |
#id ⇒ String (readonly)
19 20 21 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 19 def id @id end |
#name ⇒ String (readonly)
27 28 29 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 27 def name @name end |
#org_id ⇒ String (readonly)
21 22 23 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 21 def org_id @org_id end |
#provider ⇒ String (readonly)
10 11 12 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 10 def provider @provider end |
#public_key ⇒ String (readonly)
12 13 14 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 12 def public_key @public_key end |
#updated_at ⇒ DateTime (readonly)
25 26 27 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 25 def updated_at @updated_at end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::LangfuseCredential
Deserialize a JSON object to an instance of LangfuseCredential
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 79 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) provider = parsed_json["provider"] public_key = parsed_json["publicKey"] api_key = parsed_json["apiKey"] api_url = parsed_json["apiUrl"] id = parsed_json["id"] org_id = parsed_json["orgId"] created_at = (DateTime.parse(parsed_json["createdAt"]) unless parsed_json["createdAt"].nil?) updated_at = (DateTime.parse(parsed_json["updatedAt"]) unless parsed_json["updatedAt"].nil?) name = parsed_json["name"] new( provider: provider, public_key: public_key, api_key: api_key, api_url: api_url, id: id, org_id: org_id, created_at: created_at, updated_at: updated_at, 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.
118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 118 def self.validate_raw(obj:) obj.provider.is_a?(String) != false || raise("Passed value for field obj.provider is not the expected type, validation failed.") obj.public_key.is_a?(String) != false || raise("Passed value for field obj.public_key is not the expected type, validation failed.") obj.api_key.is_a?(String) != false || raise("Passed value for field obj.api_key is not the expected type, validation failed.") obj.api_url.is_a?(String) != false || raise("Passed value for field obj.api_url is not the expected type, validation failed.") obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.org_id.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.") obj.created_at.is_a?(DateTime) != false || raise("Passed value for field obj.created_at is not the expected type, validation failed.") obj.updated_at.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at 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 LangfuseCredential to a JSON object
108 109 110 |
# File 'lib/vapi_server_sdk/types/langfuse_credential.rb', line 108 def to_json(*_args) @_field_set&.to_json end |