moderation_api 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +87 -0
- data/README.md +61 -106
- data/docs/AccountApi.md +5 -5
- data/docs/AccountGet200Response.md +2 -2
- data/docs/AccountGet200ResponseCurrentProject.md +2 -2
- data/docs/ActionsCreateRequest.md +2 -2
- data/docs/ActionsCreateRequestWebhooksInner.md +2 -2
- data/docs/ActionsDelete200Response.md +2 -2
- data/docs/ActionsExecute200Response.md +2 -2
- data/docs/ActionsExecuteDeprecatedRequest.md +2 -2
- data/docs/ActionsExecuteRequest.md +2 -2
- data/docs/ActionsGet200Response.md +2 -2
- data/docs/ActionsGet200ResponseWebhooksInner.md +2 -2
- data/docs/ActionsList200ResponseInner.md +2 -2
- data/docs/ActionsList200ResponseInnerPossibleValuesInner.md +2 -2
- data/docs/ActionsList400Response.md +2 -2
- data/docs/ActionsList400ResponseIssuesInner.md +2 -2
- data/docs/ActionsUpdateRequest.md +2 -2
- data/docs/ModerateApi.md +26 -26
- data/docs/ModerationAudioRequest.md +2 -2
- data/docs/ModerationImage200Response.md +2 -2
- data/docs/ModerationImage200ResponseLabelsInner.md +2 -2
- data/docs/ModerationImageRequest.md +2 -2
- data/docs/ModerationObject200Response.md +2 -2
- data/docs/ModerationObject200ResponseAllOfEntitiesInner.md +2 -2
- data/docs/ModerationObject200ResponseAllOfFieldsInner.md +2 -2
- data/docs/ModerationObject200ResponseAllOfLabelsInner.md +2 -2
- data/docs/ModerationObjectRequest.md +2 -2
- data/docs/ModerationObjectRequestValue.md +2 -2
- data/docs/ModerationObjectRequestValueDataValue.md +2 -2
- data/docs/ModerationText200Response.md +2 -2
- data/docs/ModerationText200ResponseAllOfAddress.md +2 -2
- data/docs/ModerationText200ResponseAllOfEmail.md +2 -2
- data/docs/ModerationText200ResponseAllOfName.md +2 -2
- data/docs/ModerationText200ResponseAllOfNsfw.md +2 -2
- data/docs/ModerationText200ResponseAllOfNsfwLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfPhone.md +2 -2
- data/docs/ModerationText200ResponseAllOfProfanity.md +2 -2
- data/docs/ModerationText200ResponseAllOfPropriety.md +2 -2
- data/docs/ModerationText200ResponseAllOfProprietyLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfQuality.md +2 -2
- data/docs/ModerationText200ResponseAllOfQualityLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfRequest.md +2 -2
- data/docs/ModerationText200ResponseAllOfSensitive.md +2 -2
- data/docs/ModerationText200ResponseAllOfSentiment.md +2 -2
- data/docs/ModerationText200ResponseAllOfSentimentLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfToxicity.md +2 -2
- data/docs/ModerationText200ResponseAllOfToxicityLabelScores.md +2 -2
- data/docs/ModerationText200ResponseAllOfUrl.md +2 -2
- data/docs/ModerationText200ResponseAllOfUsername.md +2 -2
- data/docs/ModerationText200ResponseAllOfWordlist.md +2 -2
- data/docs/ModerationText200ResponseAllOfWordlistsInner.md +2 -2
- data/docs/ModerationTextRequest.md +2 -2
- data/docs/ModerationVideo200Response.md +2 -2
- data/docs/ModerationVideoRequest.md +2 -2
- data/docs/QueueActionsApi.md +33 -33
- data/lib/moderation_api/api/account_api.rb +1 -1
- data/lib/moderation_api/api/moderate_api.rb +1 -1
- data/lib/moderation_api/api/queue_actions_api.rb +1 -1
- data/lib/moderation_api/api_client.rb +2 -2
- data/lib/moderation_api/api_error.rb +1 -1
- data/lib/moderation_api/configuration.rb +1 -1
- data/lib/moderation_api/models/account_get200_response.rb +4 -4
- data/lib/moderation_api/models/account_get200_response_current_project.rb +4 -4
- data/lib/moderation_api/models/actions_create_request.rb +4 -4
- data/lib/moderation_api/models/actions_create_request_webhooks_inner.rb +4 -4
- data/lib/moderation_api/models/actions_delete200_response.rb +4 -4
- data/lib/moderation_api/models/actions_execute200_response.rb +4 -4
- data/lib/moderation_api/models/actions_execute_deprecated_request.rb +4 -4
- data/lib/moderation_api/models/actions_execute_request.rb +4 -4
- data/lib/moderation_api/models/actions_get200_response.rb +4 -4
- data/lib/moderation_api/models/actions_get200_response_webhooks_inner.rb +4 -4
- data/lib/moderation_api/models/actions_list200_response_inner.rb +4 -4
- data/lib/moderation_api/models/actions_list200_response_inner_possible_values_inner.rb +4 -4
- data/lib/moderation_api/models/actions_list400_response.rb +4 -4
- data/lib/moderation_api/models/actions_list400_response_issues_inner.rb +4 -4
- data/lib/moderation_api/models/actions_update_request.rb +4 -4
- data/lib/moderation_api/models/moderation_audio_request.rb +4 -4
- data/lib/moderation_api/models/moderation_image200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_image200_response_labels_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_image_request.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response_all_of_entities_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response_all_of_fields_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_object200_response_all_of_labels_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_object_request.rb +4 -4
- data/lib/moderation_api/models/moderation_object_request_value.rb +4 -4
- data/lib/moderation_api/models/moderation_object_request_value_data_value.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_address.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_email.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_name.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_nsfw_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_phone.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_profanity.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_propriety_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_quality_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_request.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_sensitive.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_sentiment_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_toxicity_label_scores.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_url.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_username.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlist.rb +4 -4
- data/lib/moderation_api/models/moderation_text200_response_all_of_wordlists_inner.rb +4 -4
- data/lib/moderation_api/models/moderation_text_request.rb +4 -4
- data/lib/moderation_api/models/moderation_video200_response.rb +4 -4
- data/lib/moderation_api/models/moderation_video_request.rb +4 -4
- data/lib/moderation_api/version.rb +2 -2
- data/lib/moderation_api/webhook.rb +41 -0
- data/lib/moderation_api.rb +56 -56
- data/moderation_api-1.2.0.gem +0 -0
- data/moderation_api-1.2.1.gem +0 -0
- data/moderation_api.gemspec +3 -3
- data/ruby_config.yaml +30 -0
- data/spec/api/account_api_spec.rb +3 -3
- data/spec/api/moderate_api_spec.rb +3 -3
- data/spec/api/queue_actions_api_spec.rb +3 -3
- data/spec/models/account_get200_response_current_project_spec.rb +4 -4
- data/spec/models/account_get200_response_spec.rb +4 -4
- data/spec/models/actions_create_request_spec.rb +4 -4
- data/spec/models/actions_create_request_webhooks_inner_spec.rb +4 -4
- data/spec/models/actions_delete200_response_spec.rb +4 -4
- data/spec/models/actions_execute200_response_spec.rb +4 -4
- data/spec/models/actions_execute_deprecated_request_spec.rb +4 -4
- data/spec/models/actions_execute_request_spec.rb +4 -4
- data/spec/models/actions_get200_response_spec.rb +4 -4
- data/spec/models/actions_get200_response_webhooks_inner_spec.rb +4 -4
- data/spec/models/actions_list200_response_inner_possible_values_inner_spec.rb +4 -4
- data/spec/models/actions_list200_response_inner_spec.rb +4 -4
- data/spec/models/actions_list400_response_issues_inner_spec.rb +4 -4
- data/spec/models/actions_list400_response_spec.rb +4 -4
- data/spec/models/actions_update_request_spec.rb +4 -4
- data/spec/models/moderation_audio_request_spec.rb +4 -4
- data/spec/models/moderation_image200_response_labels_inner_spec.rb +4 -4
- data/spec/models/moderation_image200_response_spec.rb +4 -4
- data/spec/models/moderation_image_request_spec.rb +4 -4
- data/spec/models/moderation_object200_response_all_of_entities_inner_spec.rb +4 -4
- data/spec/models/moderation_object200_response_all_of_fields_inner_spec.rb +4 -4
- data/spec/models/moderation_object200_response_all_of_labels_inner_spec.rb +4 -4
- data/spec/models/moderation_object200_response_spec.rb +4 -4
- data/spec/models/moderation_object_request_spec.rb +4 -4
- data/spec/models/moderation_object_request_value_data_value_spec.rb +4 -4
- data/spec/models/moderation_object_request_value_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_address_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_email_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_name_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_nsfw_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_nsfw_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_phone_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_profanity_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_propriety_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_propriety_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_quality_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_quality_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_request_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_sensitive_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_sentiment_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_sentiment_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_toxicity_label_scores_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_toxicity_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_url_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_username_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_wordlist_spec.rb +4 -4
- data/spec/models/moderation_text200_response_all_of_wordlists_inner_spec.rb +4 -4
- data/spec/models/moderation_text200_response_spec.rb +4 -4
- data/spec/models/moderation_text_request_spec.rb +4 -4
- data/spec/models/moderation_video200_response_spec.rb +4 -4
- data/spec/models/moderation_video_request_spec.rb +4 -4
- metadata +9 -4
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
class ModerationText200Response
|
18
18
|
# Success if the request was successful
|
19
19
|
attr_accessor :status
|
@@ -147,13 +147,13 @@ module ModerationAPI
|
|
147
147
|
# @param [Hash] attributes Model attributes in the form of hash
|
148
148
|
def initialize(attributes = {})
|
149
149
|
if (!attributes.is_a?(Hash))
|
150
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
150
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200Response` initialize method"
|
151
151
|
end
|
152
152
|
|
153
153
|
# check to see if the attribute exists and convert string to symbol for hash key
|
154
154
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
155
155
|
if (!self.class.attribute_map.key?(k.to_sym))
|
156
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
156
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
157
157
|
end
|
158
158
|
h[k.to_sym] = v
|
159
159
|
}
|
@@ -432,7 +432,7 @@ module ModerationAPI
|
|
432
432
|
end
|
433
433
|
else # model
|
434
434
|
# models (e.g. Pet) or oneOf
|
435
|
-
klass =
|
435
|
+
klass = ModerationApi.const_get(type)
|
436
436
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
437
437
|
end
|
438
438
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The address entity matcher output if enabled in your project. Read more at https://docs.moderationapi.com/models/address
|
18
18
|
class ModerationText200ResponseAllOfAddress
|
19
19
|
# The detection mode.
|
@@ -96,13 +96,13 @@ module ModerationAPI
|
|
96
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
97
|
def initialize(attributes = {})
|
98
98
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfAddress` initialize method"
|
100
100
|
end
|
101
101
|
|
102
102
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
104
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
106
|
end
|
107
107
|
h[k.to_sym] = v
|
108
108
|
}
|
@@ -247,7 +247,7 @@ module ModerationAPI
|
|
247
247
|
end
|
248
248
|
else # model
|
249
249
|
# models (e.g. Pet) or oneOf
|
250
|
-
klass =
|
250
|
+
klass = ModerationApi.const_get(type)
|
251
251
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
252
252
|
end
|
253
253
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The email entity matcher output if enabled in your project. Read more at https://docs.moderationapi.com/models/email
|
18
18
|
class ModerationText200ResponseAllOfEmail
|
19
19
|
# The detection mode.
|
@@ -96,13 +96,13 @@ module ModerationAPI
|
|
96
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
97
|
def initialize(attributes = {})
|
98
98
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfEmail` initialize method"
|
100
100
|
end
|
101
101
|
|
102
102
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
104
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfEmail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
106
|
end
|
107
107
|
h[k.to_sym] = v
|
108
108
|
}
|
@@ -247,7 +247,7 @@ module ModerationAPI
|
|
247
247
|
end
|
248
248
|
else # model
|
249
249
|
# models (e.g. Pet) or oneOf
|
250
|
-
klass =
|
250
|
+
klass = ModerationApi.const_get(type)
|
251
251
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
252
252
|
end
|
253
253
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The name entity matcher output if enabled in your project. Read more at https://docs.moderationapi.com/models/name
|
18
18
|
class ModerationText200ResponseAllOfName
|
19
19
|
# The detection mode.
|
@@ -96,13 +96,13 @@ module ModerationAPI
|
|
96
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
97
|
def initialize(attributes = {})
|
98
98
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfName` initialize method"
|
100
100
|
end
|
101
101
|
|
102
102
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
104
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfName`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
106
|
end
|
107
107
|
h[k.to_sym] = v
|
108
108
|
}
|
@@ -247,7 +247,7 @@ module ModerationAPI
|
|
247
247
|
end
|
248
248
|
else # model
|
249
249
|
# models (e.g. Pet) or oneOf
|
250
|
-
klass =
|
250
|
+
klass = ModerationApi.const_get(type)
|
251
251
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
252
252
|
end
|
253
253
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The NSFW model output if enabled in your project. Read more at https://docs.moderationapi.com/models/nsfw
|
18
18
|
class ModerationText200ResponseAllOfNsfw
|
19
19
|
# The label of the model
|
@@ -67,13 +67,13 @@ module ModerationAPI
|
|
67
67
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
68
|
def initialize(attributes = {})
|
69
69
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfNsfw` initialize method"
|
71
71
|
end
|
72
72
|
|
73
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
74
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
75
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfNsfw`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
77
|
end
|
78
78
|
h[k.to_sym] = v
|
79
79
|
}
|
@@ -199,7 +199,7 @@ module ModerationAPI
|
|
199
199
|
end
|
200
200
|
else # model
|
201
201
|
# models (e.g. Pet) or oneOf
|
202
|
-
klass =
|
202
|
+
klass = ModerationApi.const_get(type)
|
203
203
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
204
|
end
|
205
205
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The confidence of all labels
|
18
18
|
class ModerationText200ResponseAllOfNsfwLabelScores
|
19
19
|
# Mentions religion, politics, race, etc., but is neutral or positive.
|
@@ -57,13 +57,13 @@ module ModerationAPI
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfNsfwLabelScores` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfNsfwLabelScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|
@@ -179,7 +179,7 @@ module ModerationAPI
|
|
179
179
|
end
|
180
180
|
else # model
|
181
181
|
# models (e.g. Pet) or oneOf
|
182
|
-
klass =
|
182
|
+
klass = ModerationApi.const_get(type)
|
183
183
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
184
|
end
|
185
185
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The phone entity matcher output if enabled in your project. Read more at https://docs.moderationapi.com/models/phone
|
18
18
|
class ModerationText200ResponseAllOfPhone
|
19
19
|
# The detection mode.
|
@@ -96,13 +96,13 @@ module ModerationAPI
|
|
96
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
97
|
def initialize(attributes = {})
|
98
98
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfPhone` initialize method"
|
100
100
|
end
|
101
101
|
|
102
102
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
104
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfPhone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
106
|
end
|
107
107
|
h[k.to_sym] = v
|
108
108
|
}
|
@@ -247,7 +247,7 @@ module ModerationAPI
|
|
247
247
|
end
|
248
248
|
else # model
|
249
249
|
# models (e.g. Pet) or oneOf
|
250
|
-
klass =
|
250
|
+
klass = ModerationApi.const_get(type)
|
251
251
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
252
252
|
end
|
253
253
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The profanity entity matcher output if enabled in your project. Read more at https://docs.moderationapi.com/models/profanity
|
18
18
|
class ModerationText200ResponseAllOfProfanity
|
19
19
|
# The detection mode.
|
@@ -96,13 +96,13 @@ module ModerationAPI
|
|
96
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
97
|
def initialize(attributes = {})
|
98
98
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfProfanity` initialize method"
|
100
100
|
end
|
101
101
|
|
102
102
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
104
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfProfanity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
106
|
end
|
107
107
|
h[k.to_sym] = v
|
108
108
|
}
|
@@ -247,7 +247,7 @@ module ModerationAPI
|
|
247
247
|
end
|
248
248
|
else # model
|
249
249
|
# models (e.g. Pet) or oneOf
|
250
|
-
klass =
|
250
|
+
klass = ModerationApi.const_get(type)
|
251
251
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
252
252
|
end
|
253
253
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The propriety model output if enabled in your project. Read more at https://docs.moderationapi.com/models/propriety
|
18
18
|
class ModerationText200ResponseAllOfPropriety
|
19
19
|
# The label of the model
|
@@ -67,13 +67,13 @@ module ModerationAPI
|
|
67
67
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
68
|
def initialize(attributes = {})
|
69
69
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfPropriety` initialize method"
|
71
71
|
end
|
72
72
|
|
73
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
74
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
75
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfPropriety`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
77
|
end
|
78
78
|
h[k.to_sym] = v
|
79
79
|
}
|
@@ -199,7 +199,7 @@ module ModerationAPI
|
|
199
199
|
end
|
200
200
|
else # model
|
201
201
|
# models (e.g. Pet) or oneOf
|
202
|
-
klass =
|
202
|
+
klass = ModerationApi.const_get(type)
|
203
203
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
204
|
end
|
205
205
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The confidence of all labels
|
18
18
|
class ModerationText200ResponseAllOfProprietyLabelScores
|
19
19
|
# Pickup lines, compliments on appearance, etc.
|
@@ -57,13 +57,13 @@ module ModerationAPI
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfProprietyLabelScores` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfProprietyLabelScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|
@@ -179,7 +179,7 @@ module ModerationAPI
|
|
179
179
|
end
|
180
180
|
else # model
|
181
181
|
# models (e.g. Pet) or oneOf
|
182
|
-
klass =
|
182
|
+
klass = ModerationApi.const_get(type)
|
183
183
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
184
|
end
|
185
185
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The spam model output if enabled in your project. Read more at https://docs.moderationapi.com/models/spam
|
18
18
|
class ModerationText200ResponseAllOfQuality
|
19
19
|
# The label of the model
|
@@ -67,13 +67,13 @@ module ModerationAPI
|
|
67
67
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
68
|
def initialize(attributes = {})
|
69
69
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfQuality` initialize method"
|
71
71
|
end
|
72
72
|
|
73
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
74
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
75
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfQuality`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
77
|
end
|
78
78
|
h[k.to_sym] = v
|
79
79
|
}
|
@@ -199,7 +199,7 @@ module ModerationAPI
|
|
199
199
|
end
|
200
200
|
else # model
|
201
201
|
# models (e.g. Pet) or oneOf
|
202
|
-
klass =
|
202
|
+
klass = ModerationApi.const_get(type)
|
203
203
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
204
|
end
|
205
205
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The confidence of all labels
|
18
18
|
class ModerationText200ResponseAllOfQualityLabelScores
|
19
19
|
# Trivial or short content.
|
@@ -62,13 +62,13 @@ module ModerationAPI
|
|
62
62
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
63
|
def initialize(attributes = {})
|
64
64
|
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfQualityLabelScores` initialize method"
|
66
66
|
end
|
67
67
|
|
68
68
|
# check to see if the attribute exists and convert string to symbol for hash key
|
69
69
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
70
|
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfQualityLabelScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
72
|
end
|
73
73
|
h[k.to_sym] = v
|
74
74
|
}
|
@@ -189,7 +189,7 @@ module ModerationAPI
|
|
189
189
|
end
|
190
190
|
else # model
|
191
191
|
# models (e.g. Pet) or oneOf
|
192
|
-
klass =
|
192
|
+
klass = ModerationApi.const_get(type)
|
193
193
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
194
194
|
end
|
195
195
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# Information about the request
|
18
18
|
class ModerationText200ResponseAllOfRequest
|
19
19
|
# The timestamp of the request
|
@@ -53,13 +53,13 @@ module ModerationAPI
|
|
53
53
|
# @param [Hash] attributes Model attributes in the form of hash
|
54
54
|
def initialize(attributes = {})
|
55
55
|
if (!attributes.is_a?(Hash))
|
56
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfRequest` initialize method"
|
57
57
|
end
|
58
58
|
|
59
59
|
# check to see if the attribute exists and convert string to symbol for hash key
|
60
60
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
61
|
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
63
|
end
|
64
64
|
h[k.to_sym] = v
|
65
65
|
}
|
@@ -184,7 +184,7 @@ module ModerationAPI
|
|
184
184
|
end
|
185
185
|
else # model
|
186
186
|
# models (e.g. Pet) or oneOf
|
187
|
-
klass =
|
187
|
+
klass = ModerationApi.const_get(type)
|
188
188
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
189
189
|
end
|
190
190
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The sensitive numbers entity matcher output if enabled in your project. Read more at https://docs.moderationapi.com/models/sensitive
|
18
18
|
class ModerationText200ResponseAllOfSensitive
|
19
19
|
# The detection mode.
|
@@ -96,13 +96,13 @@ module ModerationAPI
|
|
96
96
|
# @param [Hash] attributes Model attributes in the form of hash
|
97
97
|
def initialize(attributes = {})
|
98
98
|
if (!attributes.is_a?(Hash))
|
99
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
99
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfSensitive` initialize method"
|
100
100
|
end
|
101
101
|
|
102
102
|
# check to see if the attribute exists and convert string to symbol for hash key
|
103
103
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
104
104
|
if (!self.class.attribute_map.key?(k.to_sym))
|
105
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfSensitive`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
106
106
|
end
|
107
107
|
h[k.to_sym] = v
|
108
108
|
}
|
@@ -247,7 +247,7 @@ module ModerationAPI
|
|
247
247
|
end
|
248
248
|
else # model
|
249
249
|
# models (e.g. Pet) or oneOf
|
250
|
-
klass =
|
250
|
+
klass = ModerationApi.const_get(type)
|
251
251
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
252
252
|
end
|
253
253
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The sentiment model output if enabled in your project. Read more at https://docs.moderationapi.com/models/sentiment
|
18
18
|
class ModerationText200ResponseAllOfSentiment
|
19
19
|
# The label of the model
|
@@ -67,13 +67,13 @@ module ModerationAPI
|
|
67
67
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
68
|
def initialize(attributes = {})
|
69
69
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfSentiment` initialize method"
|
71
71
|
end
|
72
72
|
|
73
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
74
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
75
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfSentiment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
77
|
end
|
78
78
|
h[k.to_sym] = v
|
79
79
|
}
|
@@ -199,7 +199,7 @@ module ModerationAPI
|
|
199
199
|
end
|
200
200
|
else # model
|
201
201
|
# models (e.g. Pet) or oneOf
|
202
|
-
klass =
|
202
|
+
klass = ModerationApi.const_get(type)
|
203
203
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
204
204
|
end
|
205
205
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The confidence of all labels
|
18
18
|
class ModerationText200ResponseAllOfSentimentLabelScores
|
19
19
|
# Positive sentiment.
|
@@ -57,13 +57,13 @@ module ModerationAPI
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfSentimentLabelScores` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfSentimentLabelScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|
@@ -179,7 +179,7 @@ module ModerationAPI
|
|
179
179
|
end
|
180
180
|
else # model
|
181
181
|
# models (e.g. Pet) or oneOf
|
182
|
-
klass =
|
182
|
+
klass = ModerationApi.const_get(type)
|
183
183
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
184
184
|
end
|
185
185
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The toxicity model output if enabled in your project. Read more at https://docs.moderationapi.com/models/toxicity
|
18
18
|
class ModerationText200ResponseAllOfToxicity
|
19
19
|
attr_accessor :label_scores
|
@@ -67,13 +67,13 @@ module ModerationAPI
|
|
67
67
|
# @param [Hash] attributes Model attributes in the form of hash
|
68
68
|
def initialize(attributes = {})
|
69
69
|
if (!attributes.is_a?(Hash))
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfToxicity` initialize method"
|
71
71
|
end
|
72
72
|
|
73
73
|
# check to see if the attribute exists and convert string to symbol for hash key
|
74
74
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
75
75
|
if (!self.class.attribute_map.key?(k.to_sym))
|
76
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfToxicity`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
77
77
|
end
|
78
78
|
h[k.to_sym] = v
|
79
79
|
}
|
@@ -206,7 +206,7 @@ module ModerationAPI
|
|
206
206
|
end
|
207
207
|
else # model
|
208
208
|
# models (e.g. Pet) or oneOf
|
209
|
-
klass =
|
209
|
+
klass = ModerationApi.const_get(type)
|
210
210
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
211
211
|
end
|
212
212
|
end
|
@@ -13,7 +13,7 @@ Generator version: 7.10.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module ModerationApi
|
17
17
|
# The confidence of all labels
|
18
18
|
class ModerationText200ResponseAllOfToxicityLabelScores
|
19
19
|
# Rude or disrespectful content.
|
@@ -77,13 +77,13 @@ module ModerationAPI
|
|
77
77
|
# @param [Hash] attributes Model attributes in the form of hash
|
78
78
|
def initialize(attributes = {})
|
79
79
|
if (!attributes.is_a?(Hash))
|
80
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `ModerationApi::ModerationText200ResponseAllOfToxicityLabelScores` initialize method"
|
81
81
|
end
|
82
82
|
|
83
83
|
# check to see if the attribute exists and convert string to symbol for hash key
|
84
84
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
85
|
if (!self.class.attribute_map.key?(k.to_sym))
|
86
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `ModerationApi::ModerationText200ResponseAllOfToxicityLabelScores`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
87
87
|
end
|
88
88
|
h[k.to_sym] = v
|
89
89
|
}
|
@@ -219,7 +219,7 @@ module ModerationAPI
|
|
219
219
|
end
|
220
220
|
else # model
|
221
221
|
# models (e.g. Pet) or oneOf
|
222
|
-
klass =
|
222
|
+
klass = ModerationApi.const_get(type)
|
223
223
|
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
224
224
|
end
|
225
225
|
end
|