Class: Google::Apis::ChecksV1alpha::GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig
- Inherits:
-
Object
- Object
- Google::Apis::ChecksV1alpha::GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/checks_v1alpha/classes.rb,
lib/google/apis/checks_v1alpha/representations.rb,
lib/google/apis/checks_v1alpha/representations.rb
Overview
List of policies to classify against.
Instance Attribute Summary collapse
-
#policy_type ⇒ String
Required.
-
#threshold ⇒ Float
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig
constructor
A new instance of GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig
Returns a new instance of GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig.
197 198 199 |
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 197 def initialize(**args) update!(**args) end |
Instance Attribute Details
#policy_type ⇒ String
Required. Type of the policy.
Corresponds to the JSON property policyType
188 189 190 |
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 188 def policy_type @policy_type end |
#threshold ⇒ Float
Optional. Score threshold to use when deciding if the content is violative or
non-violative. If not specified, the default 0.5 threshold for the policy will
be used.
Corresponds to the JSON property threshold
195 196 197 |
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 195 def threshold @threshold end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
202 203 204 205 |
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 202 def update!(**args) @policy_type = args[:policy_type] if args.key?(:policy_type) @threshold = args[:threshold] if args.key?(:threshold) end |