// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v6.33.2
// source: google/cloud/retail/v2/safety.proto

package retailpb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Harm categories that will block the content.
type HarmCategory int32

const (
	// The harm category is unspecified.
	HarmCategory_HARM_CATEGORY_UNSPECIFIED HarmCategory = 0
	// The harm category is hate speech.
	HarmCategory_HARM_CATEGORY_HATE_SPEECH HarmCategory = 1
	// The harm category is dangerous content.
	HarmCategory_HARM_CATEGORY_DANGEROUS_CONTENT HarmCategory = 2
	// The harm category is harassment.
	HarmCategory_HARM_CATEGORY_HARASSMENT HarmCategory = 3
	// The harm category is sexually explicit content.
	HarmCategory_HARM_CATEGORY_SEXUALLY_EXPLICIT HarmCategory = 4
	// The harm category is civic integrity.
	HarmCategory_HARM_CATEGORY_CIVIC_INTEGRITY HarmCategory = 5
)

// Enum value maps for HarmCategory.
var (
	HarmCategory_name = map[int32]string{
		0: "HARM_CATEGORY_UNSPECIFIED",
		1: "HARM_CATEGORY_HATE_SPEECH",
		2: "HARM_CATEGORY_DANGEROUS_CONTENT",
		3: "HARM_CATEGORY_HARASSMENT",
		4: "HARM_CATEGORY_SEXUALLY_EXPLICIT",
		5: "HARM_CATEGORY_CIVIC_INTEGRITY",
	}
	HarmCategory_value = map[string]int32{
		"HARM_CATEGORY_UNSPECIFIED":       0,
		"HARM_CATEGORY_HATE_SPEECH":       1,
		"HARM_CATEGORY_DANGEROUS_CONTENT": 2,
		"HARM_CATEGORY_HARASSMENT":        3,
		"HARM_CATEGORY_SEXUALLY_EXPLICIT": 4,
		"HARM_CATEGORY_CIVIC_INTEGRITY":   5,
	}
)

func (x HarmCategory) Enum() *HarmCategory {
	p := new(HarmCategory)
	*p = x
	return p
}

func (x HarmCategory) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (HarmCategory) Descriptor() protoreflect.EnumDescriptor {
	return file_google_cloud_retail_v2_safety_proto_enumTypes[0].Descriptor()
}

func (HarmCategory) Type() protoreflect.EnumType {
	return &file_google_cloud_retail_v2_safety_proto_enumTypes[0]
}

func (x HarmCategory) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use HarmCategory.Descriptor instead.
func (HarmCategory) EnumDescriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_safety_proto_rawDescGZIP(), []int{0}
}

// Probability based thresholds levels for blocking.
type SafetySetting_HarmBlockThreshold int32

const (
	// Unspecified harm block threshold.
	SafetySetting_HARM_BLOCK_THRESHOLD_UNSPECIFIED SafetySetting_HarmBlockThreshold = 0
	// Block low threshold and above (i.e. block more).
	SafetySetting_BLOCK_LOW_AND_ABOVE SafetySetting_HarmBlockThreshold = 1
	// Block medium threshold and above.
	SafetySetting_BLOCK_MEDIUM_AND_ABOVE SafetySetting_HarmBlockThreshold = 2
	// Block only high threshold (i.e. block less).
	SafetySetting_BLOCK_ONLY_HIGH SafetySetting_HarmBlockThreshold = 3
	// Block none.
	SafetySetting_BLOCK_NONE SafetySetting_HarmBlockThreshold = 4
	// Turn off the safety filter.
	SafetySetting_OFF SafetySetting_HarmBlockThreshold = 5
)

// Enum value maps for SafetySetting_HarmBlockThreshold.
var (
	SafetySetting_HarmBlockThreshold_name = map[int32]string{
		0: "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
		1: "BLOCK_LOW_AND_ABOVE",
		2: "BLOCK_MEDIUM_AND_ABOVE",
		3: "BLOCK_ONLY_HIGH",
		4: "BLOCK_NONE",
		5: "OFF",
	}
	SafetySetting_HarmBlockThreshold_value = map[string]int32{
		"HARM_BLOCK_THRESHOLD_UNSPECIFIED": 0,
		"BLOCK_LOW_AND_ABOVE":              1,
		"BLOCK_MEDIUM_AND_ABOVE":           2,
		"BLOCK_ONLY_HIGH":                  3,
		"BLOCK_NONE":                       4,
		"OFF":                              5,
	}
)

func (x SafetySetting_HarmBlockThreshold) Enum() *SafetySetting_HarmBlockThreshold {
	p := new(SafetySetting_HarmBlockThreshold)
	*p = x
	return p
}

func (x SafetySetting_HarmBlockThreshold) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (SafetySetting_HarmBlockThreshold) Descriptor() protoreflect.EnumDescriptor {
	return file_google_cloud_retail_v2_safety_proto_enumTypes[1].Descriptor()
}

func (SafetySetting_HarmBlockThreshold) Type() protoreflect.EnumType {
	return &file_google_cloud_retail_v2_safety_proto_enumTypes[1]
}

func (x SafetySetting_HarmBlockThreshold) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use SafetySetting_HarmBlockThreshold.Descriptor instead.
func (SafetySetting_HarmBlockThreshold) EnumDescriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_safety_proto_rawDescGZIP(), []int{0, 0}
}

// Probability vs severity.
type SafetySetting_HarmBlockMethod int32

const (
	// The harm block method is unspecified.
	SafetySetting_HARM_BLOCK_METHOD_UNSPECIFIED SafetySetting_HarmBlockMethod = 0
	// The harm block method uses both probability and severity scores.
	SafetySetting_SEVERITY SafetySetting_HarmBlockMethod = 1
	// The harm block method uses the probability score.
	SafetySetting_PROBABILITY SafetySetting_HarmBlockMethod = 2
)

// Enum value maps for SafetySetting_HarmBlockMethod.
var (
	SafetySetting_HarmBlockMethod_name = map[int32]string{
		0: "HARM_BLOCK_METHOD_UNSPECIFIED",
		1: "SEVERITY",
		2: "PROBABILITY",
	}
	SafetySetting_HarmBlockMethod_value = map[string]int32{
		"HARM_BLOCK_METHOD_UNSPECIFIED": 0,
		"SEVERITY":                      1,
		"PROBABILITY":                   2,
	}
)

func (x SafetySetting_HarmBlockMethod) Enum() *SafetySetting_HarmBlockMethod {
	p := new(SafetySetting_HarmBlockMethod)
	*p = x
	return p
}

func (x SafetySetting_HarmBlockMethod) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (SafetySetting_HarmBlockMethod) Descriptor() protoreflect.EnumDescriptor {
	return file_google_cloud_retail_v2_safety_proto_enumTypes[2].Descriptor()
}

func (SafetySetting_HarmBlockMethod) Type() protoreflect.EnumType {
	return &file_google_cloud_retail_v2_safety_proto_enumTypes[2]
}

func (x SafetySetting_HarmBlockMethod) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use SafetySetting_HarmBlockMethod.Descriptor instead.
func (SafetySetting_HarmBlockMethod) EnumDescriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_safety_proto_rawDescGZIP(), []int{0, 1}
}

// Safety settings.
type SafetySetting struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Harm category.
	Category HarmCategory `protobuf:"varint,1,opt,name=category,proto3,enum=google.cloud.retail.v2.HarmCategory" json:"category,omitempty"`
	// The harm block threshold.
	Threshold SafetySetting_HarmBlockThreshold `protobuf:"varint,2,opt,name=threshold,proto3,enum=google.cloud.retail.v2.SafetySetting_HarmBlockThreshold" json:"threshold,omitempty"`
	// Optional. Specify if the threshold is used for probability or severity
	// score. If not specified, the threshold is used for probability score.
	Method        SafetySetting_HarmBlockMethod `protobuf:"varint,3,opt,name=method,proto3,enum=google.cloud.retail.v2.SafetySetting_HarmBlockMethod" json:"method,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SafetySetting) Reset() {
	*x = SafetySetting{}
	mi := &file_google_cloud_retail_v2_safety_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SafetySetting) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SafetySetting) ProtoMessage() {}

func (x *SafetySetting) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_safety_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SafetySetting.ProtoReflect.Descriptor instead.
func (*SafetySetting) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_safety_proto_rawDescGZIP(), []int{0}
}

func (x *SafetySetting) GetCategory() HarmCategory {
	if x != nil {
		return x.Category
	}
	return HarmCategory_HARM_CATEGORY_UNSPECIFIED
}

func (x *SafetySetting) GetThreshold() SafetySetting_HarmBlockThreshold {
	if x != nil {
		return x.Threshold
	}
	return SafetySetting_HARM_BLOCK_THRESHOLD_UNSPECIFIED
}

func (x *SafetySetting) GetMethod() SafetySetting_HarmBlockMethod {
	if x != nil {
		return x.Method
	}
	return SafetySetting_HARM_BLOCK_METHOD_UNSPECIFIED
}

var File_google_cloud_retail_v2_safety_proto protoreflect.FileDescriptor

const file_google_cloud_retail_v2_safety_proto_rawDesc = "" +
	"\n" +
	"#google/cloud/retail/v2/safety.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xf2\x03\n" +
	"\rSafetySetting\x12@\n" +
	"\bcategory\x18\x01 \x01(\x0e2$.google.cloud.retail.v2.HarmCategoryR\bcategory\x12V\n" +
	"\tthreshold\x18\x02 \x01(\x0e28.google.cloud.retail.v2.SafetySetting.HarmBlockThresholdR\tthreshold\x12R\n" +
	"\x06method\x18\x03 \x01(\x0e25.google.cloud.retail.v2.SafetySetting.HarmBlockMethodB\x03\xe0A\x01R\x06method\"\x9d\x01\n" +
	"\x12HarmBlockThreshold\x12$\n" +
	" HARM_BLOCK_THRESHOLD_UNSPECIFIED\x10\x00\x12\x17\n" +
	"\x13BLOCK_LOW_AND_ABOVE\x10\x01\x12\x1a\n" +
	"\x16BLOCK_MEDIUM_AND_ABOVE\x10\x02\x12\x13\n" +
	"\x0fBLOCK_ONLY_HIGH\x10\x03\x12\x0e\n" +
	"\n" +
	"BLOCK_NONE\x10\x04\x12\a\n" +
	"\x03OFF\x10\x05\"S\n" +
	"\x0fHarmBlockMethod\x12!\n" +
	"\x1dHARM_BLOCK_METHOD_UNSPECIFIED\x10\x00\x12\f\n" +
	"\bSEVERITY\x10\x01\x12\x0f\n" +
	"\vPROBABILITY\x10\x02*\xd7\x01\n" +
	"\fHarmCategory\x12\x1d\n" +
	"\x19HARM_CATEGORY_UNSPECIFIED\x10\x00\x12\x1d\n" +
	"\x19HARM_CATEGORY_HATE_SPEECH\x10\x01\x12#\n" +
	"\x1fHARM_CATEGORY_DANGEROUS_CONTENT\x10\x02\x12\x1c\n" +
	"\x18HARM_CATEGORY_HARASSMENT\x10\x03\x12#\n" +
	"\x1fHARM_CATEGORY_SEXUALLY_EXPLICIT\x10\x04\x12!\n" +
	"\x1dHARM_CATEGORY_CIVIC_INTEGRITY\x10\x05B\xb6\x01\n" +
	"\x1acom.google.cloud.retail.v2B\vSafetyProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"

var (
	file_google_cloud_retail_v2_safety_proto_rawDescOnce sync.Once
	file_google_cloud_retail_v2_safety_proto_rawDescData []byte
)

func file_google_cloud_retail_v2_safety_proto_rawDescGZIP() []byte {
	file_google_cloud_retail_v2_safety_proto_rawDescOnce.Do(func() {
		file_google_cloud_retail_v2_safety_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_retail_v2_safety_proto_rawDesc), len(file_google_cloud_retail_v2_safety_proto_rawDesc)))
	})
	return file_google_cloud_retail_v2_safety_proto_rawDescData
}

var file_google_cloud_retail_v2_safety_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_google_cloud_retail_v2_safety_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_google_cloud_retail_v2_safety_proto_goTypes = []any{
	(HarmCategory)(0),                     // 0: google.cloud.retail.v2.HarmCategory
	(SafetySetting_HarmBlockThreshold)(0), // 1: google.cloud.retail.v2.SafetySetting.HarmBlockThreshold
	(SafetySetting_HarmBlockMethod)(0),    // 2: google.cloud.retail.v2.SafetySetting.HarmBlockMethod
	(*SafetySetting)(nil),                 // 3: google.cloud.retail.v2.SafetySetting
}
var file_google_cloud_retail_v2_safety_proto_depIdxs = []int32{
	0, // 0: google.cloud.retail.v2.SafetySetting.category:type_name -> google.cloud.retail.v2.HarmCategory
	1, // 1: google.cloud.retail.v2.SafetySetting.threshold:type_name -> google.cloud.retail.v2.SafetySetting.HarmBlockThreshold
	2, // 2: google.cloud.retail.v2.SafetySetting.method:type_name -> google.cloud.retail.v2.SafetySetting.HarmBlockMethod
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_google_cloud_retail_v2_safety_proto_init() }
func file_google_cloud_retail_v2_safety_proto_init() {
	if File_google_cloud_retail_v2_safety_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_cloud_retail_v2_safety_proto_rawDesc), len(file_google_cloud_retail_v2_safety_proto_rawDesc)),
			NumEnums:      3,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_retail_v2_safety_proto_goTypes,
		DependencyIndexes: file_google_cloud_retail_v2_safety_proto_depIdxs,
		EnumInfos:         file_google_cloud_retail_v2_safety_proto_enumTypes,
		MessageInfos:      file_google_cloud_retail_v2_safety_proto_msgTypes,
	}.Build()
	File_google_cloud_retail_v2_safety_proto = out.File
	file_google_cloud_retail_v2_safety_proto_goTypes = nil
	file_google_cloud_retail_v2_safety_proto_depIdxs = nil
}
