// Customer is fraser's top-level tenant -- the IA-parity public surface
// for the existing `customers` table that fraser's admin.v1 / Drizzle
// layer already owns. Resource shape mirrors ia.tenancy.v1.Customer.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        (unknown)
// source: tars/tenancy/v1/customer.proto

package tenancyv1

import (
	_ "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"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

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

// CustomerState is the lifecycle of a customer record. ARCHIVED is the
// soft-deleted state -- the row stays in customers with deleted_at set.
type CustomerState int32

const (
	CustomerState_CUSTOMER_STATE_UNSPECIFIED CustomerState = 0
	CustomerState_CUSTOMER_STATE_ACTIVE      CustomerState = 1
	CustomerState_CUSTOMER_STATE_ARCHIVED    CustomerState = 2
)

// Enum value maps for CustomerState.
var (
	CustomerState_name = map[int32]string{
		0: "CUSTOMER_STATE_UNSPECIFIED",
		1: "CUSTOMER_STATE_ACTIVE",
		2: "CUSTOMER_STATE_ARCHIVED",
	}
	CustomerState_value = map[string]int32{
		"CUSTOMER_STATE_UNSPECIFIED": 0,
		"CUSTOMER_STATE_ACTIVE":      1,
		"CUSTOMER_STATE_ARCHIVED":    2,
	}
)

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

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

func (CustomerState) Descriptor() protoreflect.EnumDescriptor {
	return file_tars_tenancy_v1_customer_proto_enumTypes[0].Descriptor()
}

func (CustomerState) Type() protoreflect.EnumType {
	return &file_tars_tenancy_v1_customer_proto_enumTypes[0]
}

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

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

// Customer mirrors ia.tenancy.v1.Customer with fraser-shaped fields.
// `customer_id` is the operator-scoped slug (e.g. "acme") -- the
// natural key callers use everywhere. `id` is the server-assigned uuid
// row key.
type Customer struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Server-assigned uuid row id. Output-only.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Operator-scoped slug used in CLI and URLs (e.g. "acme"). Required
	// on create; immutable thereafter.
	CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
	// Human-friendly display name.
	DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Freeform description.
	Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// Lifecycle state.
	State CustomerState `protobuf:"varint,5,opt,name=state,proto3,enum=tars.tenancy.v1.CustomerState" json:"state,omitempty"`
	// Freeform labels for filtering / grouping.
	Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// When the customer row was created. Output-only.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,50,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// When the customer row was last modified. Output-only.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,51,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// When the customer was archived (soft-deleted, state ARCHIVED); unset
	// while active. Maps to the row's deleted_at. Output-only.
	ArchivedAt    *timestamppb.Timestamp `protobuf:"bytes,52,opt,name=archived_at,json=archivedAt,proto3" json:"archived_at,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Customer) ProtoMessage() {}

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

func (x *Customer) GetId() string {
	if x != nil {
		return x.Id
	}
	return ""
}

func (x *Customer) GetCustomerId() string {
	if x != nil {
		return x.CustomerId
	}
	return ""
}

func (x *Customer) GetDisplayName() string {
	if x != nil {
		return x.DisplayName
	}
	return ""
}

func (x *Customer) GetDescription() string {
	if x != nil {
		return x.Description
	}
	return ""
}

func (x *Customer) GetState() CustomerState {
	if x != nil {
		return x.State
	}
	return CustomerState_CUSTOMER_STATE_UNSPECIFIED
}

func (x *Customer) GetLabels() map[string]string {
	if x != nil {
		return x.Labels
	}
	return nil
}

func (x *Customer) GetCreatedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.CreatedAt
	}
	return nil
}

func (x *Customer) GetUpdatedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.UpdatedAt
	}
	return nil
}

func (x *Customer) GetArchivedAt() *timestamppb.Timestamp {
	if x != nil {
		return x.ArchivedAt
	}
	return nil
}

var File_tars_tenancy_v1_customer_proto protoreflect.FileDescriptor

const file_tars_tenancy_v1_customer_proto_rawDesc = "" +
	"\n" +
	"\x1etars/tenancy/v1/customer.proto\x12\x0ftars.tenancy.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x04\n" +
	"\bCustomer\x12\x13\n" +
	"\x02id\x18\x01 \x01(\tB\x03\xe0A\x03R\x02id\x12$\n" +
	"\vcustomer_id\x18\x02 \x01(\tB\x03\xe0A\x02R\n" +
	"customerId\x12!\n" +
	"\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12 \n" +
	"\vdescription\x18\x04 \x01(\tR\vdescription\x129\n" +
	"\x05state\x18\x05 \x01(\x0e2\x1e.tars.tenancy.v1.CustomerStateB\x03\xe0A\x03R\x05state\x12=\n" +
	"\x06labels\x18\x06 \x03(\v2%.tars.tenancy.v1.Customer.LabelsEntryR\x06labels\x12>\n" +
	"\n" +
	"created_at\x182 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\tcreatedAt\x12>\n" +
	"\n" +
	"updated_at\x183 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\tupdatedAt\x12@\n" +
	"\varchived_at\x184 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
	"archivedAt\x1a9\n" +
	"\vLabelsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*g\n" +
	"\rCustomerState\x12\x1e\n" +
	"\x1aCUSTOMER_STATE_UNSPECIFIED\x10\x00\x12\x19\n" +
	"\x15CUSTOMER_STATE_ACTIVE\x10\x01\x12\x1b\n" +
	"\x17CUSTOMER_STATE_ARCHIVED\x10\x02B\xbd\x01\n" +
	"\x13com.tars.tenancy.v1B\rCustomerProtoP\x01Z9github.com/tetrateio/fraser/api/tars/tenancy/v1;tenancyv1\xa2\x02\x03TTX\xaa\x02\x0fTars.Tenancy.V1\xca\x02\x0fTars\\Tenancy\\V1\xe2\x02\x1bTars\\Tenancy\\V1\\GPBMetadata\xea\x02\x11Tars::Tenancy::V1b\x06proto3"

var (
	file_tars_tenancy_v1_customer_proto_rawDescOnce sync.Once
	file_tars_tenancy_v1_customer_proto_rawDescData []byte
)

func file_tars_tenancy_v1_customer_proto_rawDescGZIP() []byte {
	file_tars_tenancy_v1_customer_proto_rawDescOnce.Do(func() {
		file_tars_tenancy_v1_customer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tars_tenancy_v1_customer_proto_rawDesc), len(file_tars_tenancy_v1_customer_proto_rawDesc)))
	})
	return file_tars_tenancy_v1_customer_proto_rawDescData
}

var file_tars_tenancy_v1_customer_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_tars_tenancy_v1_customer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_tars_tenancy_v1_customer_proto_goTypes = []any{
	(CustomerState)(0),            // 0: tars.tenancy.v1.CustomerState
	(*Customer)(nil),              // 1: tars.tenancy.v1.Customer
	nil,                           // 2: tars.tenancy.v1.Customer.LabelsEntry
	(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
}
var file_tars_tenancy_v1_customer_proto_depIdxs = []int32{
	0, // 0: tars.tenancy.v1.Customer.state:type_name -> tars.tenancy.v1.CustomerState
	2, // 1: tars.tenancy.v1.Customer.labels:type_name -> tars.tenancy.v1.Customer.LabelsEntry
	3, // 2: tars.tenancy.v1.Customer.created_at:type_name -> google.protobuf.Timestamp
	3, // 3: tars.tenancy.v1.Customer.updated_at:type_name -> google.protobuf.Timestamp
	3, // 4: tars.tenancy.v1.Customer.archived_at:type_name -> google.protobuf.Timestamp
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_tars_tenancy_v1_customer_proto_init() }
func file_tars_tenancy_v1_customer_proto_init() {
	if File_tars_tenancy_v1_customer_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_tars_tenancy_v1_customer_proto_rawDesc), len(file_tars_tenancy_v1_customer_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_tars_tenancy_v1_customer_proto_goTypes,
		DependencyIndexes: file_tars_tenancy_v1_customer_proto_depIdxs,
		EnumInfos:         file_tars_tenancy_v1_customer_proto_enumTypes,
		MessageInfos:      file_tars_tenancy_v1_customer_proto_msgTypes,
	}.Build()
	File_tars_tenancy_v1_customer_proto = out.File
	file_tars_tenancy_v1_customer_proto_goTypes = nil
	file_tars_tenancy_v1_customer_proto_depIdxs = nil
}
