// Copyright IBM Corp. 2020, 2026
// SPDX-License-Identifier: MPL-2.0

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: worker/proxy/v1/proxy.proto

package proxy

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

type HANDSHAKECOMMAND int32

const (
	// Note: Unspecified is the desired zero value based on protolint, but for
	// our purposes it simply means a normal connection.
	HANDSHAKECOMMAND_HANDSHAKECOMMAND_UNSPECIFIED    HANDSHAKECOMMAND = 0
	HANDSHAKECOMMAND_HANDSHAKECOMMAND_SESSION_CANCEL HANDSHAKECOMMAND = 1
)

// Enum value maps for HANDSHAKECOMMAND.
var (
	HANDSHAKECOMMAND_name = map[int32]string{
		0: "HANDSHAKECOMMAND_UNSPECIFIED",
		1: "HANDSHAKECOMMAND_SESSION_CANCEL",
	}
	HANDSHAKECOMMAND_value = map[string]int32{
		"HANDSHAKECOMMAND_UNSPECIFIED":    0,
		"HANDSHAKECOMMAND_SESSION_CANCEL": 1,
	}
)

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

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

func (HANDSHAKECOMMAND) Descriptor() protoreflect.EnumDescriptor {
	return file_worker_proxy_v1_proxy_proto_enumTypes[0].Descriptor()
}

func (HANDSHAKECOMMAND) Type() protoreflect.EnumType {
	return &file_worker_proxy_v1_proxy_proto_enumTypes[0]
}

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

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

type ClientHandshake struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	TofuToken     string                 `protobuf:"bytes,10,opt,name=tofu_token,json=tofuToken,proto3" json:"tofu_token,omitempty"`
	Command       HANDSHAKECOMMAND       `protobuf:"varint,20,opt,name=command,proto3,enum=worker.proxy.v1.HANDSHAKECOMMAND" json:"command,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ClientHandshake) ProtoMessage() {}

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

func (x *ClientHandshake) GetTofuToken() string {
	if x != nil {
		return x.TofuToken
	}
	return ""
}

func (x *ClientHandshake) GetCommand() HANDSHAKECOMMAND {
	if x != nil {
		return x.Command
	}
	return HANDSHAKECOMMAND_HANDSHAKECOMMAND_UNSPECIFIED
}

type HandshakeResult struct {
	state           protoimpl.MessageState `protogen:"open.v1"`
	Expiration      *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=expiration,proto3" json:"expiration,omitempty"`
	ConnectionLimit int32                  `protobuf:"varint,20,opt,name=connection_limit,json=connectionLimit,proto3" json:"connection_limit,omitempty"`
	ConnectionsLeft int32                  `protobuf:"varint,30,opt,name=connections_left,json=connectionsLeft,proto3" json:"connections_left,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*HandshakeResult) ProtoMessage() {}

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

func (x *HandshakeResult) GetExpiration() *timestamppb.Timestamp {
	if x != nil {
		return x.Expiration
	}
	return nil
}

func (x *HandshakeResult) GetConnectionLimit() int32 {
	if x != nil {
		return x.ConnectionLimit
	}
	return 0
}

func (x *HandshakeResult) GetConnectionsLeft() int32 {
	if x != nil {
		return x.ConnectionsLeft
	}
	return 0
}

var File_worker_proxy_v1_proxy_proto protoreflect.FileDescriptor

const file_worker_proxy_v1_proxy_proto_rawDesc = "" +
	"\n" +
	"\x1bworker/proxy/v1/proxy.proto\x12\x0fworker.proxy.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"m\n" +
	"\x0fClientHandshake\x12\x1d\n" +
	"\n" +
	"tofu_token\x18\n" +
	" \x01(\tR\ttofuToken\x12;\n" +
	"\acommand\x18\x14 \x01(\x0e2!.worker.proxy.v1.HANDSHAKECOMMANDR\acommand\"\xa3\x01\n" +
	"\x0fHandshakeResult\x12:\n" +
	"\n" +
	"expiration\x18\n" +
	" \x01(\v2\x1a.google.protobuf.TimestampR\n" +
	"expiration\x12)\n" +
	"\x10connection_limit\x18\x14 \x01(\x05R\x0fconnectionLimit\x12)\n" +
	"\x10connections_left\x18\x1e \x01(\x05R\x0fconnectionsLeft*Y\n" +
	"\x10HANDSHAKECOMMAND\x12 \n" +
	"\x1cHANDSHAKECOMMAND_UNSPECIFIED\x10\x00\x12#\n" +
	"\x1fHANDSHAKECOMMAND_SESSION_CANCEL\x10\x01B3Z1github.com/hashicorp/boundary/sdk/pbs/proxy;proxyb\x06proto3"

var (
	file_worker_proxy_v1_proxy_proto_rawDescOnce sync.Once
	file_worker_proxy_v1_proxy_proto_rawDescData []byte
)

func file_worker_proxy_v1_proxy_proto_rawDescGZIP() []byte {
	file_worker_proxy_v1_proxy_proto_rawDescOnce.Do(func() {
		file_worker_proxy_v1_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_worker_proxy_v1_proxy_proto_rawDesc), len(file_worker_proxy_v1_proxy_proto_rawDesc)))
	})
	return file_worker_proxy_v1_proxy_proto_rawDescData
}

var file_worker_proxy_v1_proxy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_worker_proxy_v1_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_worker_proxy_v1_proxy_proto_goTypes = []any{
	(HANDSHAKECOMMAND)(0),         // 0: worker.proxy.v1.HANDSHAKECOMMAND
	(*ClientHandshake)(nil),       // 1: worker.proxy.v1.ClientHandshake
	(*HandshakeResult)(nil),       // 2: worker.proxy.v1.HandshakeResult
	(*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
}
var file_worker_proxy_v1_proxy_proto_depIdxs = []int32{
	0, // 0: worker.proxy.v1.ClientHandshake.command:type_name -> worker.proxy.v1.HANDSHAKECOMMAND
	3, // 1: worker.proxy.v1.HandshakeResult.expiration: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_worker_proxy_v1_proxy_proto_init() }
func file_worker_proxy_v1_proxy_proto_init() {
	if File_worker_proxy_v1_proxy_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_worker_proxy_v1_proxy_proto_rawDesc), len(file_worker_proxy_v1_proxy_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_worker_proxy_v1_proxy_proto_goTypes,
		DependencyIndexes: file_worker_proxy_v1_proxy_proto_depIdxs,
		EnumInfos:         file_worker_proxy_v1_proxy_proto_enumTypes,
		MessageInfos:      file_worker_proxy_v1_proxy_proto_msgTypes,
	}.Build()
	File_worker_proxy_v1_proxy_proto = out.File
	file_worker_proxy_v1_proxy_proto_goTypes = nil
	file_worker_proxy_v1_proxy_proto_depIdxs = nil
}
