Class: Vapi::GetSessionPaginatedDto
- Inherits:
-
Object
- Object
- Vapi::GetSessionPaginatedDto
- Defined in:
- lib/vapi_server_sdk/types/get_session_paginated_dto.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#assistant_id ⇒ String
readonly
This is the ID of the assistant to filter sessions by.
-
#created_at_ge ⇒ DateTime
readonly
This will return items where the createdAt is greater than or equal to the specified value.
-
#created_at_gt ⇒ DateTime
readonly
This will return items where the createdAt is greater than the specified value.
-
#created_at_le ⇒ DateTime
readonly
This will return items where the createdAt is less than or equal to the specified value.
-
#created_at_lt ⇒ DateTime
readonly
This will return items where the createdAt is less than the specified value.
-
#limit ⇒ Float
readonly
This is the maximum number of items to return.
-
#name ⇒ String
readonly
This is the name of the session to filter by.
-
#page ⇒ Float
readonly
This is the page number to return.
-
#sort_order ⇒ Vapi::GetSessionPaginatedDtoSortOrder
readonly
This is the sort order for pagination.
-
#updated_at_ge ⇒ DateTime
readonly
This will return items where the updatedAt is greater than or equal to the specified value.
-
#updated_at_gt ⇒ DateTime
readonly
This will return items where the updatedAt is greater than the specified value.
-
#updated_at_le ⇒ DateTime
readonly
This will return items where the updatedAt is less than or equal to the specified value.
-
#updated_at_lt ⇒ DateTime
readonly
This will return items where the updatedAt is less than the specified value.
-
#workflow_id ⇒ String
readonly
This is the ID of the workflow to filter sessions by.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ Vapi::GetSessionPaginatedDto
Deserialize a JSON object to an instance of GetSessionPaginatedDto.
-
.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(name: OMIT, assistant_id: OMIT, workflow_id: OMIT, page: OMIT, sort_order: OMIT, limit: OMIT, created_at_gt: OMIT, created_at_lt: OMIT, created_at_ge: OMIT, created_at_le: OMIT, updated_at_gt: OMIT, updated_at_lt: OMIT, updated_at_ge: OMIT, updated_at_le: OMIT, additional_properties: nil) ⇒ Vapi::GetSessionPaginatedDto constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of GetSessionPaginatedDto to a JSON object.
Constructor Details
#initialize(name: OMIT, assistant_id: OMIT, workflow_id: OMIT, page: OMIT, sort_order: OMIT, limit: OMIT, created_at_gt: OMIT, created_at_lt: OMIT, created_at_ge: OMIT, created_at_le: OMIT, updated_at_gt: OMIT, updated_at_lt: OMIT, updated_at_ge: OMIT, updated_at_le: OMIT, additional_properties: nil) ⇒ Vapi::GetSessionPaginatedDto
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 70 def initialize(name: OMIT, assistant_id: OMIT, workflow_id: OMIT, page: OMIT, sort_order: OMIT, limit: OMIT, created_at_gt: OMIT, created_at_lt: OMIT, created_at_ge: OMIT, created_at_le: OMIT, updated_at_gt: OMIT, updated_at_lt: OMIT, updated_at_ge: OMIT, updated_at_le: OMIT, additional_properties: nil) @name = name if name != OMIT @assistant_id = assistant_id if assistant_id != OMIT @workflow_id = workflow_id if workflow_id != OMIT @page = page if page != OMIT @sort_order = sort_order if sort_order != OMIT @limit = limit if limit != OMIT @created_at_gt = created_at_gt if created_at_gt != OMIT @created_at_lt = created_at_lt if created_at_lt != OMIT @created_at_ge = created_at_ge if created_at_ge != OMIT @created_at_le = created_at_le if created_at_le != OMIT @updated_at_gt = updated_at_gt if updated_at_gt != OMIT @updated_at_lt = updated_at_lt if updated_at_lt != OMIT @updated_at_ge = updated_at_ge if updated_at_ge != OMIT @updated_at_le = updated_at_le if updated_at_le != OMIT @additional_properties = additional_properties @_field_set = { "name": name, "assistantId": assistant_id, "workflowId": workflow_id, "page": page, "sortOrder": sort_order, "limit": limit, "createdAtGt": created_at_gt, "createdAtLt": created_at_lt, "createdAtGe": created_at_ge, "createdAtLe": created_at_le, "updatedAtGt": updated_at_gt, "updatedAtLt": updated_at_lt, "updatedAtGe": updated_at_ge, "updatedAtLe": updated_at_le }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
43 44 45 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 43 def additional_properties @additional_properties end |
#assistant_id ⇒ String (readonly)
Returns This is the ID of the assistant to filter sessions by.
13 14 15 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 13 def assistant_id @assistant_id end |
#created_at_ge ⇒ DateTime (readonly)
Returns This will return items where the createdAt is greater than or equal to the specified value.
28 29 30 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 28 def created_at_ge @created_at_ge end |
#created_at_gt ⇒ DateTime (readonly)
Returns This will return items where the createdAt is greater than the specified value.
23 24 25 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 23 def created_at_gt @created_at_gt end |
#created_at_le ⇒ DateTime (readonly)
Returns This will return items where the createdAt is less than or equal to the specified value.
31 32 33 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 31 def created_at_le @created_at_le end |
#created_at_lt ⇒ DateTime (readonly)
Returns This will return items where the createdAt is less than the specified value.
25 26 27 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 25 def created_at_lt @created_at_lt end |
#limit ⇒ Float (readonly)
Returns This is the maximum number of items to return. Defaults to 100.
21 22 23 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 21 def limit @limit end |
#name ⇒ String (readonly)
Returns This is the name of the session to filter by.
11 12 13 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 11 def name @name end |
#page ⇒ Float (readonly)
Returns This is the page number to return. Defaults to 1.
17 18 19 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 17 def page @page end |
#sort_order ⇒ Vapi::GetSessionPaginatedDtoSortOrder (readonly)
Returns This is the sort order for pagination. Defaults to ‘DESC’.
19 20 21 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 19 def sort_order @sort_order end |
#updated_at_ge ⇒ DateTime (readonly)
Returns This will return items where the updatedAt is greater than or equal to the specified value.
38 39 40 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 38 def updated_at_ge @updated_at_ge end |
#updated_at_gt ⇒ DateTime (readonly)
Returns This will return items where the updatedAt is greater than the specified value.
33 34 35 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 33 def updated_at_gt @updated_at_gt end |
#updated_at_le ⇒ DateTime (readonly)
Returns This will return items where the updatedAt is less than or equal to the specified value.
41 42 43 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 41 def updated_at_le @updated_at_le end |
#updated_at_lt ⇒ DateTime (readonly)
Returns This will return items where the updatedAt is less than the specified value.
35 36 37 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 35 def updated_at_lt @updated_at_lt end |
#workflow_id ⇒ String (readonly)
Returns This is the ID of the workflow to filter sessions by.
15 16 17 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 15 def workflow_id @workflow_id end |
Class Method Details
.from_json(json_object:) ⇒ Vapi::GetSessionPaginatedDto
Deserialize a JSON object to an instance of GetSessionPaginatedDto
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 111 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) name = parsed_json["name"] assistant_id = parsed_json["assistantId"] workflow_id = parsed_json["workflowId"] page = parsed_json["page"] sort_order = parsed_json["sortOrder"] limit = parsed_json["limit"] created_at_gt = (DateTime.parse(parsed_json["createdAtGt"]) unless parsed_json["createdAtGt"].nil?) created_at_lt = (DateTime.parse(parsed_json["createdAtLt"]) unless parsed_json["createdAtLt"].nil?) created_at_ge = (DateTime.parse(parsed_json["createdAtGe"]) unless parsed_json["createdAtGe"].nil?) created_at_le = (DateTime.parse(parsed_json["createdAtLe"]) unless parsed_json["createdAtLe"].nil?) updated_at_gt = (DateTime.parse(parsed_json["updatedAtGt"]) unless parsed_json["updatedAtGt"].nil?) updated_at_lt = (DateTime.parse(parsed_json["updatedAtLt"]) unless parsed_json["updatedAtLt"].nil?) updated_at_ge = (DateTime.parse(parsed_json["updatedAtGe"]) unless parsed_json["updatedAtGe"].nil?) updated_at_le = (DateTime.parse(parsed_json["updatedAtLe"]) unless parsed_json["updatedAtLe"].nil?) new( name: name, assistant_id: assistant_id, workflow_id: workflow_id, page: page, sort_order: sort_order, limit: limit, created_at_gt: created_at_gt, created_at_lt: created_at_lt, created_at_ge: created_at_ge, created_at_le: created_at_le, updated_at_gt: updated_at_gt, updated_at_lt: updated_at_lt, updated_at_ge: updated_at_ge, updated_at_le: updated_at_le, 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.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 160 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.") obj.assistant_id&.is_a?(String) != false || raise("Passed value for field obj.assistant_id is not the expected type, validation failed.") obj.workflow_id&.is_a?(String) != false || raise("Passed value for field obj.workflow_id is not the expected type, validation failed.") obj.page&.is_a?(Float) != false || raise("Passed value for field obj.page is not the expected type, validation failed.") obj.sort_order&.is_a?(Vapi::GetSessionPaginatedDtoSortOrder) != false || raise("Passed value for field obj.sort_order is not the expected type, validation failed.") obj.limit&.is_a?(Float) != false || raise("Passed value for field obj.limit is not the expected type, validation failed.") obj.created_at_gt&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at_gt is not the expected type, validation failed.") obj.created_at_lt&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at_lt is not the expected type, validation failed.") obj.created_at_ge&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at_ge is not the expected type, validation failed.") obj.created_at_le&.is_a?(DateTime) != false || raise("Passed value for field obj.created_at_le is not the expected type, validation failed.") obj.updated_at_gt&.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at_gt is not the expected type, validation failed.") obj.updated_at_lt&.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at_lt is not the expected type, validation failed.") obj.updated_at_ge&.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at_ge is not the expected type, validation failed.") obj.updated_at_le&.is_a?(DateTime) != false || raise("Passed value for field obj.updated_at_le is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of GetSessionPaginatedDto to a JSON object
150 151 152 |
# File 'lib/vapi_server_sdk/types/get_session_paginated_dto.rb', line 150 def to_json(*_args) @_field_set&.to_json end |