Class: Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb

Overview

Customer policy enforcement results. Contains the results of the various policy checks, like the banned phrases or the Model Armor checks.

Defined Under Namespace

Modules: Verdict Classes: BannedPhraseEnforcementResult, ModelArmorEnforcementResult, PolicyEnforcementResult

Instance Attribute Summary collapse

Instance Attribute Details

#policy_results::Array<::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::PolicyEnforcementResult>

Returns Customer policy enforcement results. Populated only if the assist call was skipped due to a policy violation. It contains results from those filters that blocked the processing of the query.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 76

class CustomerPolicyEnforcementResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Customer policy enforcement result for the banned phrase policy.
  # @!attribute [rw] banned_phrases
  #   @return [::Array<::String>]
  #     The banned phrases that were found in the query or the answer.
  class BannedPhraseEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement result for the Model Armor policy.
  # @!attribute [rw] model_armor_violation
  #   @return [::String]
  #     The Model Armor violation that was found.
  #
  #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] error
  #   @return [::Google::Rpc::Status]
  #     The error returned by Model Armor if the policy enforcement failed
  #     for some reason.
  #
  #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class ModelArmorEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement result for a single policy type.
  # @!attribute [rw] banned_phrase_enforcement_result
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
  #     The policy enforcement result for the banned phrase policy.
  #
  #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] model_armor_enforcement_result
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
  #     The policy enforcement result for the Model Armor policy.
  #
  #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class PolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The verdict of the customer policy enforcement.
  module Verdict
    # Unknown value.
    UNSPECIFIED = 0

    # There was no policy violation.
    ALLOW = 1

    # Processing was blocked by the customer policy.
    BLOCK = 2
  end
end

#verdict::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::Verdict

Returns Final verdict of the customer policy enforcement. If only one policy blocked the processing, the verdict is BLOCK.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'proto_docs/google/cloud/discoveryengine/v1beta/assist_answer.rb', line 76

class CustomerPolicyEnforcementResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Customer policy enforcement result for the banned phrase policy.
  # @!attribute [rw] banned_phrases
  #   @return [::Array<::String>]
  #     The banned phrases that were found in the query or the answer.
  class BannedPhraseEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement result for the Model Armor policy.
  # @!attribute [rw] model_armor_violation
  #   @return [::String]
  #     The Model Armor violation that was found.
  #
  #     Note: The following fields are mutually exclusive: `model_armor_violation`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] error
  #   @return [::Google::Rpc::Status]
  #     The error returned by Model Armor if the policy enforcement failed
  #     for some reason.
  #
  #     Note: The following fields are mutually exclusive: `error`, `model_armor_violation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class ModelArmorEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Customer policy enforcement result for a single policy type.
  # @!attribute [rw] banned_phrase_enforcement_result
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::BannedPhraseEnforcementResult]
  #     The policy enforcement result for the banned phrase policy.
  #
  #     Note: The following fields are mutually exclusive: `banned_phrase_enforcement_result`, `model_armor_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  # @!attribute [rw] model_armor_enforcement_result
  #   @return [::Google::Cloud::DiscoveryEngine::V1beta::AssistAnswer::CustomerPolicyEnforcementResult::ModelArmorEnforcementResult]
  #     The policy enforcement result for the Model Armor policy.
  #
  #     Note: The following fields are mutually exclusive: `model_armor_enforcement_result`, `banned_phrase_enforcement_result`. If a field in that set is populated, all other fields in the set will automatically be cleared.
  class PolicyEnforcementResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The verdict of the customer policy enforcement.
  module Verdict
    # Unknown value.
    UNSPECIFIED = 0

    # There was no policy violation.
    ALLOW = 1

    # Processing was blocked by the customer policy.
    BLOCK = 2
  end
end