Class: AssemblyAI::Lemur::PurgeLemurRequestDataResponse
- Inherits:
-
Object
- Object
- AssemblyAI::Lemur::PurgeLemurRequestDataResponse
- Defined in:
- lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#deleted ⇒ Boolean
readonly
Whether the request data was deleted.
-
#request_id ⇒ String
readonly
The ID of the deletion request of the LeMUR request.
-
#request_id_to_purge ⇒ String
readonly
The ID of the LeMUR request to purge the data for.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ AssemblyAI::Lemur::PurgeLemurRequestDataResponse
Deserialize a JSON object to an instance of PurgeLemurRequestDataResponse.
-
.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(request_id:, request_id_to_purge:, deleted:, additional_properties: nil) ⇒ AssemblyAI::Lemur::PurgeLemurRequestDataResponse constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of PurgeLemurRequestDataResponse to a JSON object.
Constructor Details
#initialize(request_id:, request_id_to_purge:, deleted:, additional_properties: nil) ⇒ AssemblyAI::Lemur::PurgeLemurRequestDataResponse
28 29 30 31 32 33 34 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 28 def initialize(request_id:, request_id_to_purge:, deleted:, additional_properties: nil) @request_id = request_id @request_id_to_purge = request_id_to_purge @deleted = deleted @additional_properties = additional_properties @_field_set = { "request_id": request_id, "request_id_to_purge": request_id_to_purge, "deleted": deleted } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
16 17 18 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 16 def additional_properties @additional_properties end |
#deleted ⇒ Boolean (readonly)
Returns Whether the request data was deleted.
14 15 16 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 14 def deleted @deleted end |
#request_id ⇒ String (readonly)
Returns The ID of the deletion request of the LeMUR request.
10 11 12 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 10 def request_id @request_id end |
#request_id_to_purge ⇒ String (readonly)
Returns The ID of the LeMUR request to purge the data for.
12 13 14 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 12 def request_id_to_purge @request_id_to_purge end |
Class Method Details
.from_json(json_object:) ⇒ AssemblyAI::Lemur::PurgeLemurRequestDataResponse
Deserialize a JSON object to an instance of PurgeLemurRequestDataResponse
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 40 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) request_id = struct["request_id"] request_id_to_purge = struct["request_id_to_purge"] deleted = struct["deleted"] new( request_id: request_id, request_id_to_purge: request_id_to_purge, deleted: deleted, 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.
66 67 68 69 70 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 66 def self.validate_raw(obj:) obj.request_id.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.") obj.request_id_to_purge.is_a?(String) != false || raise("Passed value for field obj.request_id_to_purge is not the expected type, validation failed.") obj.deleted.is_a?(Boolean) != false || raise("Passed value for field obj.deleted is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of PurgeLemurRequestDataResponse to a JSON object
56 57 58 |
# File 'lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 56 def to_json(*_args) @_field_set&.to_json end |