Class: Vapi::LangfuseObservabilityPlan
- Inherits:
-
Object
- Object
- Vapi::LangfuseObservabilityPlan
- Defined in:
- lib/vapi_server_sdk/types/langfuse_observability_plan.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#metadata ⇒ Hash{String => Object}
readonly
This is a JSON object that will be added to the Langfuse trace.
- #provider ⇒ String readonly
-
#tags ⇒ Array<String>
readonly
This is an array of tags to be added to the Langfuse trace.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::LangfuseObservabilityPlan
Deserialize a JSON object to an instance of LangfuseObservabilityPlan.
-
.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:, tags:, metadata: OMIT, additional_properties: nil) ⇒ Vapi::LangfuseObservabilityPlan constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of LangfuseObservabilityPlan to a JSON object.
Constructor Details
#initialize(provider:, tags:, metadata: OMIT, additional_properties: nil) ⇒ Vapi::LangfuseObservabilityPlan
37 38 39 40 41 42 43 44 45 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 37 def initialize(provider:, tags:, metadata: OMIT, additional_properties: nil) @provider = provider @tags = @metadata = if != OMIT @additional_properties = additional_properties @_field_set = { "provider": provider, "tags": , "metadata": }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
20 21 22 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 20 def additional_properties @additional_properties end |
#metadata ⇒ Hash{String => Object} (readonly)
18 19 20 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 18 def @metadata end |
#provider ⇒ String (readonly)
9 10 11 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 9 def provider @provider end |
#tags ⇒ Array<String> (readonly)
12 13 14 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 12 def @tags end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::LangfuseObservabilityPlan
Deserialize a JSON object to an instance of LangfuseObservabilityPlan
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 51 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) provider = parsed_json["provider"] = parsed_json["tags"] = parsed_json["metadata"] new( provider: provider, tags: , metadata: , 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.
78 79 80 81 82 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 78 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..is_a?(Array) != false || raise("Passed value for field obj.tags is not the expected type, validation failed.") obj.&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of LangfuseObservabilityPlan to a JSON object
68 69 70 |
# File 'lib/vapi_server_sdk/types/langfuse_observability_plan.rb', line 68 def to_json(*_args) @_field_set&.to_json end |