Class: Vellum::UpdateActiveWorkspaceResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/vellum_ai/types/update_active_workspace_response.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(update_active_workspace_id: OMIT, update_active_environment_id: OMIT, is_staff: OMIT, additional_properties: nil) ⇒ Vellum::UpdateActiveWorkspaceResponse

Parameters:

  • is_staff (Boolean) (defaults to: OMIT)

    Whether or not the user is a staff member of Vellum.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



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_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    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_staffBoolean (readonly)

Returns Whether or not the user is a staff member of Vellum.

Returns:

  • (Boolean)

    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_idObject (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_idObject (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

Parameters:

  • json_object (String)

Returns:



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

Parameters:

  • obj (Object)

Returns:

  • (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_jsonString

Returns:

  • (String)


59
60
61
# File 'lib/vellum_ai/types/update_active_workspace_response.rb', line 59

def to_json
  @_field_set&.to_json
end