Class: AssemblyAI::Lemur::PurgeLemurRequestDataResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_id:, request_id_to_purge:, deleted:, additional_properties: nil) ⇒ AssemblyAI::Lemur::PurgeLemurRequestDataResponse

Parameters:

  • request_id (String)

    The ID of the deletion request of the LeMUR request

  • request_id_to_purge (String)

    The ID of the LeMUR request to purge the data for

  • deleted (Boolean)

    Whether the request data was deleted

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



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_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/assemblyai/lemur/types/purge_lemur_request_data_response.rb', line 16

def additional_properties
  @additional_properties
end

#deletedBoolean (readonly)

Returns Whether the request data was deleted.

Returns:

  • (Boolean)

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

Returns The ID of the deletion request of the LeMUR request.

Returns:

  • (String)

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

Returns The ID of the LeMUR request to purge the data for.

Returns:

  • (String)

    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

Parameters:

  • json_object (String)

Returns:



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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


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

Returns:

  • (String)


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