Class: Vellum::PromptDeploymentReleasePromptDeployment
- Inherits:
-
Object
- Object
- Vellum::PromptDeploymentReleasePromptDeployment
- Defined in:
- lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #name ⇒ String readonly
Class Method Summary collapse
- .from_json(json_object:) ⇒ Vellum::PromptDeploymentReleasePromptDeployment
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(name:, additional_properties: nil) ⇒ Vellum::PromptDeploymentReleasePromptDeployment constructor
- #to_json ⇒ String
Constructor Details
#initialize(name:, additional_properties: nil) ⇒ Vellum::PromptDeploymentReleasePromptDeployment
20 21 22 23 24 |
# File 'lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb', line 20 def initialize(name:, additional_properties: nil) @name = name @additional_properties = additional_properties @_field_set = { "name": name } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
10 11 12 |
# File 'lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb', line 10 def additional_properties @additional_properties end |
#name ⇒ String (readonly)
8 9 10 |
# File 'lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb', line 8 def name @name end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::PromptDeploymentReleasePromptDeployment
30 31 32 33 34 35 |
# File 'lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb', line 30 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) name = parsed_json["name"] new(name: name, additional_properties: struct) end |
.validate_raw(obj:) ⇒ Void
49 50 51 |
# File 'lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb', line 49 def self.validate_raw(obj:) 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 ⇒ String
40 41 42 |
# File 'lib/vellum_ai/types/prompt_deployment_release_prompt_deployment.rb', line 40 def to_json @_field_set&.to_json end |