// 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/purge_config.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"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)

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)
)

// Metadata related to the progress of the Purge operation.
// This will be returned by the google.longrunning.Operation.metadata field.
type PurgeMetadata struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*PurgeMetadata) ProtoMessage() {}

func (x *PurgeMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_purge_config_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 PurgeMetadata.ProtoReflect.Descriptor instead.
func (*PurgeMetadata) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP(), []int{0}
}

// Metadata related to the progress of the PurgeProducts operation.
// This will be returned by the google.longrunning.Operation.metadata field.
type PurgeProductsMetadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Operation create time.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Operation last update time. If the operation is done, this is also the
	// finish time.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Count of entries that were deleted successfully.
	SuccessCount int64 `protobuf:"varint,3,opt,name=success_count,json=successCount,proto3" json:"success_count,omitempty"`
	// Count of entries that encountered errors while processing.
	FailureCount  int64 `protobuf:"varint,4,opt,name=failure_count,json=failureCount,proto3" json:"failure_count,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PurgeProductsMetadata) Reset() {
	*x = PurgeProductsMetadata{}
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PurgeProductsMetadata) ProtoMessage() {}

func (x *PurgeProductsMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[1]
	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 PurgeProductsMetadata.ProtoReflect.Descriptor instead.
func (*PurgeProductsMetadata) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP(), []int{1}
}

func (x *PurgeProductsMetadata) GetCreateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.CreateTime
	}
	return nil
}

func (x *PurgeProductsMetadata) GetUpdateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.UpdateTime
	}
	return nil
}

func (x *PurgeProductsMetadata) GetSuccessCount() int64 {
	if x != nil {
		return x.SuccessCount
	}
	return 0
}

func (x *PurgeProductsMetadata) GetFailureCount() int64 {
	if x != nil {
		return x.FailureCount
	}
	return 0
}

// Request message for PurgeProducts method.
type PurgeProductsRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The resource name of the branch under which the products are
	// created. The format is
	// `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The filter string to specify the products to be deleted with a
	// length limit of 5,000 characters.
	//
	// Empty string filter is not allowed. "*" implies delete all items in a
	// branch.
	//
	// The eligible fields for filtering are:
	//
	// * `availability`: Double quoted
	// [Product.availability][google.cloud.retail.v2.Product.availability] string.
	// * `create_time` : in ISO 8601 "zulu" format.
	//
	// Supported syntax:
	//
	//   - Comparators (">", "<", ">=", "<=", "=").
	//     Examples:
	//   - create_time <= "2015-02-13T17:05:46Z"
	//   - availability = "IN_STOCK"
	//
	//   - Conjunctions ("AND")
	//     Examples:
	//   - create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
	//
	//   - Disjunctions ("OR")
	//     Examples:
	//   - create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
	//
	//   - Can support nested queries.
	//     Examples:
	//   - (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
	//     OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
	//
	// * Filter Limits:
	//   - Filter should not contain more than 6 conditions.
	//   - Max nesting depth should not exceed 2 levels.
	//
	// Examples queries:
	//   - Delete back order products created before a timestamp.
	//     create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
	Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// Actually perform the purge.
	// If `force` is set to false, the method will return the expected purge count
	// without deleting any products.
	Force         bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PurgeProductsRequest) Reset() {
	*x = PurgeProductsRequest{}
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PurgeProductsRequest) ProtoMessage() {}

func (x *PurgeProductsRequest) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[2]
	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 PurgeProductsRequest.ProtoReflect.Descriptor instead.
func (*PurgeProductsRequest) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP(), []int{2}
}

func (x *PurgeProductsRequest) GetParent() string {
	if x != nil {
		return x.Parent
	}
	return ""
}

func (x *PurgeProductsRequest) GetFilter() string {
	if x != nil {
		return x.Filter
	}
	return ""
}

func (x *PurgeProductsRequest) GetForce() bool {
	if x != nil {
		return x.Force
	}
	return false
}

// Response of the PurgeProductsRequest. If the long running operation is
// successfully done, then this message is returned by the
// google.longrunning.Operations.response field.
type PurgeProductsResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The total count of products purged as a result of the operation.
	PurgeCount int64 `protobuf:"varint,1,opt,name=purge_count,json=purgeCount,proto3" json:"purge_count,omitempty"`
	// A sample of the product names that will be deleted.
	// Only populated if `force` is set to false. A max of 100 names will be
	// returned and the names are chosen at random.
	PurgeSample   []string `protobuf:"bytes,2,rep,name=purge_sample,json=purgeSample,proto3" json:"purge_sample,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PurgeProductsResponse) Reset() {
	*x = PurgeProductsResponse{}
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PurgeProductsResponse) ProtoMessage() {}

func (x *PurgeProductsResponse) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[3]
	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 PurgeProductsResponse.ProtoReflect.Descriptor instead.
func (*PurgeProductsResponse) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP(), []int{3}
}

func (x *PurgeProductsResponse) GetPurgeCount() int64 {
	if x != nil {
		return x.PurgeCount
	}
	return 0
}

func (x *PurgeProductsResponse) GetPurgeSample() []string {
	if x != nil {
		return x.PurgeSample
	}
	return nil
}

// Request message for PurgeUserEvents method.
type PurgeUserEventsRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The resource name of the catalog under which the events are
	// created. The format is
	// `projects/${projectId}/locations/global/catalogs/${catalogId}`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The filter string to specify the events to be deleted with a
	// length limit of 5,000 characters. Empty string filter is not allowed. The
	// eligible fields for filtering are:
	//
	// * `eventType`: Double quoted
	// [UserEvent.event_type][google.cloud.retail.v2.UserEvent.event_type] string.
	//   - `eventTime`: in ISO 8601 "zulu" format.
	//   - `visitorId`: Double quoted string. Specifying this will delete all
	//     events associated with a visitor.
	//   - `userId`: Double quoted string. Specifying this will delete all events
	//     associated with a user.
	//
	// Examples:
	//
	//   - Deleting all events in a time range:
	//     `eventTime > "2012-04-23T18:25:43.511Z"
	//     eventTime < "2012-04-23T18:30:43.511Z"`
	//   - Deleting specific eventType in time range:
	//     `eventTime > "2012-04-23T18:25:43.511Z" eventType = "detail-page-view"`
	//   - Deleting all events for a specific visitor:
	//     `visitorId = "visitor1024"`
	//
	// The filtering fields are assumed to have an implicit AND.
	Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// Actually perform the purge.
	// If `force` is set to false, the method will return the expected purge count
	// without deleting any user events.
	Force         bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PurgeUserEventsRequest) Reset() {
	*x = PurgeUserEventsRequest{}
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PurgeUserEventsRequest) ProtoMessage() {}

func (x *PurgeUserEventsRequest) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[4]
	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 PurgeUserEventsRequest.ProtoReflect.Descriptor instead.
func (*PurgeUserEventsRequest) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP(), []int{4}
}

func (x *PurgeUserEventsRequest) GetParent() string {
	if x != nil {
		return x.Parent
	}
	return ""
}

func (x *PurgeUserEventsRequest) GetFilter() string {
	if x != nil {
		return x.Filter
	}
	return ""
}

func (x *PurgeUserEventsRequest) GetForce() bool {
	if x != nil {
		return x.Force
	}
	return false
}

// Response of the PurgeUserEventsRequest. If the long running operation is
// successfully done, then this message is returned by the
// google.longrunning.Operations.response field.
type PurgeUserEventsResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The total count of events purged as a result of the operation.
	PurgedEventsCount int64 `protobuf:"varint,1,opt,name=purged_events_count,json=purgedEventsCount,proto3" json:"purged_events_count,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

func (x *PurgeUserEventsResponse) Reset() {
	*x = PurgeUserEventsResponse{}
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PurgeUserEventsResponse) ProtoMessage() {}

func (x *PurgeUserEventsResponse) ProtoReflect() protoreflect.Message {
	mi := &file_google_cloud_retail_v2_purge_config_proto_msgTypes[5]
	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 PurgeUserEventsResponse.ProtoReflect.Descriptor instead.
func (*PurgeUserEventsResponse) Descriptor() ([]byte, []int) {
	return file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP(), []int{5}
}

func (x *PurgeUserEventsResponse) GetPurgedEventsCount() int64 {
	if x != nil {
		return x.PurgedEventsCount
	}
	return 0
}

var File_google_cloud_retail_v2_purge_config_proto protoreflect.FileDescriptor

const file_google_cloud_retail_v2_purge_config_proto_rawDesc = "" +
	"\n" +
	")google/cloud/retail/v2/purge_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x0f\n" +
	"\rPurgeMetadata\"\xdb\x01\n" +
	"\x15PurgeProductsMetadata\x12;\n" +
	"\vcreate_time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
	"createTime\x12;\n" +
	"\vupdate_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
	"updateTime\x12#\n" +
	"\rsuccess_count\x18\x03 \x01(\x03R\fsuccessCount\x12#\n" +
	"\rfailure_count\x18\x04 \x01(\x03R\ffailureCount\"\x87\x01\n" +
	"\x14PurgeProductsRequest\x12<\n" +
	"\x06parent\x18\x01 \x01(\tB$\xe0A\x02\xfaA\x1e\n" +
	"\x1cretail.googleapis.com/BranchR\x06parent\x12\x1b\n" +
	"\x06filter\x18\x02 \x01(\tB\x03\xe0A\x02R\x06filter\x12\x14\n" +
	"\x05force\x18\x03 \x01(\bR\x05force\"\x7f\n" +
	"\x15PurgeProductsResponse\x12\x1f\n" +
	"\vpurge_count\x18\x01 \x01(\x03R\n" +
	"purgeCount\x12E\n" +
	"\fpurge_sample\x18\x02 \x03(\tB\"\xfaA\x1f\n" +
	"\x1dretail.googleapis.com/ProductR\vpurgeSample\"\x8a\x01\n" +
	"\x16PurgeUserEventsRequest\x12=\n" +
	"\x06parent\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" +
	"\x1dretail.googleapis.com/CatalogR\x06parent\x12\x1b\n" +
	"\x06filter\x18\x02 \x01(\tB\x03\xe0A\x02R\x06filter\x12\x14\n" +
	"\x05force\x18\x03 \x01(\bR\x05force\"I\n" +
	"\x17PurgeUserEventsResponse\x12.\n" +
	"\x13purged_events_count\x18\x01 \x01(\x03R\x11purgedEventsCountB\xbb\x01\n" +
	"\x1acom.google.cloud.retail.v2B\x10PurgeConfigProtoP\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_purge_config_proto_rawDescOnce sync.Once
	file_google_cloud_retail_v2_purge_config_proto_rawDescData []byte
)

func file_google_cloud_retail_v2_purge_config_proto_rawDescGZIP() []byte {
	file_google_cloud_retail_v2_purge_config_proto_rawDescOnce.Do(func() {
		file_google_cloud_retail_v2_purge_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_retail_v2_purge_config_proto_rawDesc), len(file_google_cloud_retail_v2_purge_config_proto_rawDesc)))
	})
	return file_google_cloud_retail_v2_purge_config_proto_rawDescData
}

var file_google_cloud_retail_v2_purge_config_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_google_cloud_retail_v2_purge_config_proto_goTypes = []any{
	(*PurgeMetadata)(nil),           // 0: google.cloud.retail.v2.PurgeMetadata
	(*PurgeProductsMetadata)(nil),   // 1: google.cloud.retail.v2.PurgeProductsMetadata
	(*PurgeProductsRequest)(nil),    // 2: google.cloud.retail.v2.PurgeProductsRequest
	(*PurgeProductsResponse)(nil),   // 3: google.cloud.retail.v2.PurgeProductsResponse
	(*PurgeUserEventsRequest)(nil),  // 4: google.cloud.retail.v2.PurgeUserEventsRequest
	(*PurgeUserEventsResponse)(nil), // 5: google.cloud.retail.v2.PurgeUserEventsResponse
	(*timestamppb.Timestamp)(nil),   // 6: google.protobuf.Timestamp
}
var file_google_cloud_retail_v2_purge_config_proto_depIdxs = []int32{
	6, // 0: google.cloud.retail.v2.PurgeProductsMetadata.create_time:type_name -> google.protobuf.Timestamp
	6, // 1: google.cloud.retail.v2.PurgeProductsMetadata.update_time:type_name -> google.protobuf.Timestamp
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_google_cloud_retail_v2_purge_config_proto_init() }
func file_google_cloud_retail_v2_purge_config_proto_init() {
	if File_google_cloud_retail_v2_purge_config_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_purge_config_proto_rawDesc), len(file_google_cloud_retail_v2_purge_config_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   6,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_retail_v2_purge_config_proto_goTypes,
		DependencyIndexes: file_google_cloud_retail_v2_purge_config_proto_depIdxs,
		MessageInfos:      file_google_cloud_retail_v2_purge_config_proto_msgTypes,
	}.Build()
	File_google_cloud_retail_v2_purge_config_proto = out.File
	file_google_cloud_retail_v2_purge_config_proto_goTypes = nil
	file_google_cloud_retail_v2_purge_config_proto_depIdxs = nil
}
