Class: Vapi::CreateLangfuseCredentialDto
- Inherits:
-
Object
- Object
- Vapi::CreateLangfuseCredentialDto
- Defined in:
- lib/vapi_server_sdk/types/create_langfuse_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.
-
#api_key ⇒ String
readonly
The secret key for Langfuse project.
-
#api_url ⇒ String
readonly
The host URL for Langfuse project.
-
#name ⇒ String
readonly
This is the name of credential.
-
#public_key ⇒ String
readonly
The public key for Langfuse project.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::CreateLangfuseCredentialDto
Deserialize a JSON object to an instance of CreateLangfuseCredentialDto.
-
.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(public_key:, api_key:, api_url:, name: OMIT, additional_properties: nil) ⇒ Vapi::CreateLangfuseCredentialDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of CreateLangfuseCredentialDto to a JSON object.
Constructor Details
#initialize(public_key:, api_key:, api_url:, name: OMIT, additional_properties: nil) ⇒ Vapi::CreateLangfuseCredentialDto
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 32 def initialize(public_key:, api_key:, api_url:, name: OMIT, additional_properties: nil) @public_key = public_key @api_key = api_key @api_url = api_url @name = name if name != OMIT @additional_properties = additional_properties @_field_set = { "publicKey": public_key, "apiKey": api_key, "apiUrl": api_url, "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.
18 19 20 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 18 def additional_properties @additional_properties end |
#api_key ⇒ String (readonly)
Returns The secret key for Langfuse project. Eg: sk-lf-… .This is not returned in the API.
12 13 14 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 12 def api_key @api_key end |
#api_url ⇒ String (readonly)
Returns The host URL for Langfuse project. Eg: cloud.langfuse.com.
14 15 16 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 14 def api_url @api_url end |
#name ⇒ String (readonly)
Returns This is the name of credential. This is just for your reference.
16 17 18 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 16 def name @name end |
#public_key ⇒ String (readonly)
Returns The public key for Langfuse project. Eg: pk-lf-…
9 10 11 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 9 def public_key @public_key end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::CreateLangfuseCredentialDto
Deserialize a JSON object to an instance of CreateLangfuseCredentialDto
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 47 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) public_key = parsed_json["publicKey"] api_key = parsed_json["apiKey"] api_url = parsed_json["apiUrl"] name = parsed_json["name"] new( public_key: public_key, api_key: api_key, api_url: api_url, 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.
76 77 78 79 80 81 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 76 def self.validate_raw(obj:) 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.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 CreateLangfuseCredentialDto to a JSON object
66 67 68 |
# File 'lib/vapi_server_sdk/types/create_langfuse_credential_dto.rb', line 66 def to_json(*_args) @_field_set&.to_json end |