Class: Google::Apis::ChecksV1alpha::GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_typeString

Required. Type of the policy. Corresponds to the JSON property policyType

Returns:

  • (String)


188
189
190
# File 'lib/google/apis/checks_v1alpha/classes.rb', line 188

def policy_type
  @policy_type
end

#thresholdFloat

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

Returns:

  • (Float)


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