Class: Vellum::UpdateActiveWorkspaceResponse
- Inherits:
-
Object
- Object
- Vellum::UpdateActiveWorkspaceResponse
- Defined in:
- lib/vellum_ai/types/update_active_workspace_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#is_staff ⇒ Boolean
readonly
Whether or not the user is a staff member of Vellum.
-
#update_active_environment_id ⇒ Object
readonly
environment change needed.
-
#update_active_workspace_id ⇒ Object
readonly
change needed.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(update_active_workspace_id: OMIT, update_active_environment_id: OMIT, is_staff: OMIT, additional_properties: nil) ⇒ Vellum::UpdateActiveWorkspaceResponse constructor
- #to_json ⇒ String
Constructor Details
#initialize(update_active_workspace_id: OMIT, update_active_environment_id: OMIT, is_staff: OMIT, additional_properties: nil) ⇒ Vellum::UpdateActiveWorkspaceResponse
30 31 32 33 34 35 36 37 38 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 30 def initialize(update_active_workspace_id: OMIT, update_active_environment_id: OMIT, is_staff: OMIT, additional_properties: nil) @update_active_workspace_id = update_active_workspace_id if update_active_workspace_id != OMIT @update_active_environment_id = update_active_environment_id if update_active_environment_id != OMIT @is_staff = is_staff if is_staff != OMIT @additional_properties = additional_properties @_field_set = { "update_active_workspace_id": update_active_workspace_id, "update_active_environment_id": update_active_environment_id, "is_staff": is_staff }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
16 17 18 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 16 def additional_properties @additional_properties end |
#is_staff ⇒ Boolean (readonly)
Returns Whether or not the user is a staff member of Vellum.
14 15 16 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 14 def is_staff @is_staff end |
#update_active_environment_id ⇒ Object (readonly)
environment change needed.
12 13 14 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 12 def update_active_environment_id @update_active_environment_id end |
#update_active_workspace_id ⇒ Object (readonly)
change needed.
9 10 11 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 9 def update_active_workspace_id @update_active_workspace_id end |
Class Method Details
.from_json(json_object:) ⇒ Vellum::UpdateActiveWorkspaceResponse
43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 43 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) update_active_workspace_id = parsed_json["update_active_workspace_id"] update_active_environment_id = parsed_json["update_active_environment_id"] is_staff = parsed_json["is_staff"] new( update_active_workspace_id: update_active_workspace_id, update_active_environment_id: update_active_environment_id, is_staff: is_staff, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
68 69 70 71 72 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 68 def self.validate_raw(obj:) obj.update_active_workspace_id&.is_a?(String) != false || raise("Passed value for field obj.update_active_workspace_id is not the expected type, validation failed.") obj.update_active_environment_id&.is_a?(String) != false || raise("Passed value for field obj.update_active_environment_id is not the expected type, validation failed.") obj.is_staff&.is_a?(Boolean) != false || raise("Passed value for field obj.is_staff is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
59 60 61 |
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 59 def to_json @_field_set&.to_json end |