// Copyright 2026 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/bigquery/migration/v2/migration_error_details.proto

package migrationpb

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

	_ "google.golang.org/genproto/googleapis/api/annotations"
	errdetails "google.golang.org/genproto/googleapis/rpc/errdetails"
	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)
)

// Provides details for errors and the corresponding resources.
type ResourceErrorDetail struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. Information about the resource where the error is located.
	ResourceInfo *errdetails.ResourceInfo `protobuf:"bytes,1,opt,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"`
	// Required. The error details for the resource.
	ErrorDetails []*ErrorDetail `protobuf:"bytes,2,rep,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"`
	// Required. How many errors there are in total for the resource. Truncation
	// can be indicated by having an `error_count` that is higher than the size of
	// `error_details`.
	ErrorCount    int32 `protobuf:"varint,3,opt,name=error_count,json=errorCount,proto3" json:"error_count,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ResourceErrorDetail) ProtoMessage() {}

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

func (x *ResourceErrorDetail) GetResourceInfo() *errdetails.ResourceInfo {
	if x != nil {
		return x.ResourceInfo
	}
	return nil
}

func (x *ResourceErrorDetail) GetErrorDetails() []*ErrorDetail {
	if x != nil {
		return x.ErrorDetails
	}
	return nil
}

func (x *ResourceErrorDetail) GetErrorCount() int32 {
	if x != nil {
		return x.ErrorCount
	}
	return 0
}

// Provides details for errors, e.g. issues that where encountered when
// processing a subtask.
type ErrorDetail struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Optional. The exact location within the resource (if applicable).
	Location *ErrorLocation `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	// Required. Describes the cause of the error with structured detail.
	ErrorInfo     *errdetails.ErrorInfo `protobuf:"bytes,2,opt,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ErrorDetail) ProtoMessage() {}

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

func (x *ErrorDetail) GetLocation() *ErrorLocation {
	if x != nil {
		return x.Location
	}
	return nil
}

func (x *ErrorDetail) GetErrorInfo() *errdetails.ErrorInfo {
	if x != nil {
		return x.ErrorInfo
	}
	return nil
}

// Holds information about where the error is located.
type ErrorLocation struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Optional. If applicable, denotes the line where the error occurred. A zero
	// value means that there is no line information.
	Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
	// Optional. If applicable, denotes the column where the error occurred. A
	// zero value means that there is no columns information.
	Column        int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ErrorLocation) ProtoMessage() {}

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

func (x *ErrorLocation) GetLine() int32 {
	if x != nil {
		return x.Line
	}
	return 0
}

func (x *ErrorLocation) GetColumn() int32 {
	if x != nil {
		return x.Column
	}
	return 0
}

var File_google_cloud_bigquery_migration_v2_migration_error_details_proto protoreflect.FileDescriptor

const file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDesc = "" +
	"\n" +
	"@google/cloud/bigquery/migration/v2/migration_error_details.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/rpc/error_details.proto\"\xda\x01\n" +
	"\x13ResourceErrorDetail\x12B\n" +
	"\rresource_info\x18\x01 \x01(\v2\x18.google.rpc.ResourceInfoB\x03\xe0A\x02R\fresourceInfo\x12Y\n" +
	"\rerror_details\x18\x02 \x03(\v2/.google.cloud.bigquery.migration.v2.ErrorDetailB\x03\xe0A\x02R\ferrorDetails\x12$\n" +
	"\verror_count\x18\x03 \x01(\x05B\x03\xe0A\x02R\n" +
	"errorCount\"\x9c\x01\n" +
	"\vErrorDetail\x12R\n" +
	"\blocation\x18\x01 \x01(\v21.google.cloud.bigquery.migration.v2.ErrorLocationB\x03\xe0A\x01R\blocation\x129\n" +
	"\n" +
	"error_info\x18\x02 \x01(\v2\x15.google.rpc.ErrorInfoB\x03\xe0A\x02R\terrorInfo\"E\n" +
	"\rErrorLocation\x12\x17\n" +
	"\x04line\x18\x01 \x01(\x05B\x03\xe0A\x01R\x04line\x12\x1b\n" +
	"\x06column\x18\x02 \x01(\x05B\x03\xe0A\x01R\x06columnB\xd6\x01\n" +
	"&com.google.cloud.bigquery.migration.v2B\x1aMigrationErrorDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3"

var (
	file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDescOnce sync.Once
	file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDescData []byte
)

func file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDescGZIP() []byte {
	file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDescOnce.Do(func() {
		file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDesc), len(file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDesc)))
	})
	return file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDescData
}

var file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_google_cloud_bigquery_migration_v2_migration_error_details_proto_goTypes = []any{
	(*ResourceErrorDetail)(nil),     // 0: google.cloud.bigquery.migration.v2.ResourceErrorDetail
	(*ErrorDetail)(nil),             // 1: google.cloud.bigquery.migration.v2.ErrorDetail
	(*ErrorLocation)(nil),           // 2: google.cloud.bigquery.migration.v2.ErrorLocation
	(*errdetails.ResourceInfo)(nil), // 3: google.rpc.ResourceInfo
	(*errdetails.ErrorInfo)(nil),    // 4: google.rpc.ErrorInfo
}
var file_google_cloud_bigquery_migration_v2_migration_error_details_proto_depIdxs = []int32{
	3, // 0: google.cloud.bigquery.migration.v2.ResourceErrorDetail.resource_info:type_name -> google.rpc.ResourceInfo
	1, // 1: google.cloud.bigquery.migration.v2.ResourceErrorDetail.error_details:type_name -> google.cloud.bigquery.migration.v2.ErrorDetail
	2, // 2: google.cloud.bigquery.migration.v2.ErrorDetail.location:type_name -> google.cloud.bigquery.migration.v2.ErrorLocation
	4, // 3: google.cloud.bigquery.migration.v2.ErrorDetail.error_info:type_name -> google.rpc.ErrorInfo
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_google_cloud_bigquery_migration_v2_migration_error_details_proto_init() }
func file_google_cloud_bigquery_migration_v2_migration_error_details_proto_init() {
	if File_google_cloud_bigquery_migration_v2_migration_error_details_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_bigquery_migration_v2_migration_error_details_proto_rawDesc), len(file_google_cloud_bigquery_migration_v2_migration_error_details_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_google_cloud_bigquery_migration_v2_migration_error_details_proto_goTypes,
		DependencyIndexes: file_google_cloud_bigquery_migration_v2_migration_error_details_proto_depIdxs,
		MessageInfos:      file_google_cloud_bigquery_migration_v2_migration_error_details_proto_msgTypes,
	}.Build()
	File_google_cloud_bigquery_migration_v2_migration_error_details_proto = out.File
	file_google_cloud_bigquery_migration_v2_migration_error_details_proto_goTypes = nil
	file_google_cloud_bigquery_migration_v2_migration_error_details_proto_depIdxs = nil
}
