// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.7
// 	protoc        v6.30.2
// source: spire/api/types/federationrelationship.proto

package types

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	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 FederationRelationship struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The trust domain name (e.g., "example.org") to federate with.
	TrustDomain string `protobuf:"bytes,1,opt,name=trust_domain,json=trustDomain,proto3" json:"trust_domain,omitempty"`
	// Required. URL of the SPIFFE bundle endpoint that provides the trust
	// bundle to federate with. Must use the HTTPS protocol.
	BundleEndpointUrl string `protobuf:"bytes,2,opt,name=bundle_endpoint_url,json=bundleEndpointUrl,proto3" json:"bundle_endpoint_url,omitempty"`
	// Required. The endpoint profile type.
	//
	// Types that are valid to be assigned to BundleEndpointProfile:
	//
	//	*FederationRelationship_HttpsWeb
	//	*FederationRelationship_HttpsSpiffe
	BundleEndpointProfile isFederationRelationship_BundleEndpointProfile `protobuf_oneof:"bundle_endpoint_profile"`
	// Optional. The bundle for the trust domain. This field can be used to
	// create or replace the referenced trust domains' bundle when the
	// relationship is created or updated.  When the relationship is retrieved,
	// it will be set to the referenced trust domain's latest bundle (if
	// available). Please note that the `https_spiffe` profile requires an
	// existing trust domain bundle in order to function correctly. The
	// required bundle must match the trust domain specified in the bundle
	// endpoint SPIFFE ID. If the bundle endpoint SPIFFE ID resides in the same
	// trust domain that you're trying to federate with, you may optionally
	// specify that trust domain bundle here. If the bundle endpoint SPIFFE ID
	// _does not_ reside in the same trust domain that you're federating with,
	// please ensure that the trust domain bundle for that trust domain has
	// been configured separately (e.g. configured via another federation
	// relationship or manually set via the Bundle API).
	TrustDomainBundle *Bundle `protobuf:"bytes,5,opt,name=trust_domain_bundle,json=trustDomainBundle,proto3" json:"trust_domain_bundle,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*FederationRelationship) ProtoMessage() {}

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

func (x *FederationRelationship) GetTrustDomain() string {
	if x != nil {
		return x.TrustDomain
	}
	return ""
}

func (x *FederationRelationship) GetBundleEndpointUrl() string {
	if x != nil {
		return x.BundleEndpointUrl
	}
	return ""
}

func (x *FederationRelationship) GetBundleEndpointProfile() isFederationRelationship_BundleEndpointProfile {
	if x != nil {
		return x.BundleEndpointProfile
	}
	return nil
}

func (x *FederationRelationship) GetHttpsWeb() *HTTPSWebProfile {
	if x != nil {
		if x, ok := x.BundleEndpointProfile.(*FederationRelationship_HttpsWeb); ok {
			return x.HttpsWeb
		}
	}
	return nil
}

func (x *FederationRelationship) GetHttpsSpiffe() *HTTPSSPIFFEProfile {
	if x != nil {
		if x, ok := x.BundleEndpointProfile.(*FederationRelationship_HttpsSpiffe); ok {
			return x.HttpsSpiffe
		}
	}
	return nil
}

func (x *FederationRelationship) GetTrustDomainBundle() *Bundle {
	if x != nil {
		return x.TrustDomainBundle
	}
	return nil
}

type isFederationRelationship_BundleEndpointProfile interface {
	isFederationRelationship_BundleEndpointProfile()
}

type FederationRelationship_HttpsWeb struct {
	// Use Web PKI endpoint profile.
	HttpsWeb *HTTPSWebProfile `protobuf:"bytes,3,opt,name=https_web,json=httpsWeb,proto3,oneof"`
}

type FederationRelationship_HttpsSpiffe struct {
	// Use SPIFFE Authentication endpoint profile.
	HttpsSpiffe *HTTPSSPIFFEProfile `protobuf:"bytes,4,opt,name=https_spiffe,json=httpsSpiffe,proto3,oneof"`
}

func (*FederationRelationship_HttpsWeb) isFederationRelationship_BundleEndpointProfile() {}

func (*FederationRelationship_HttpsSpiffe) isFederationRelationship_BundleEndpointProfile() {}

type HTTPSSPIFFEProfile struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. Specifies the expected SPIFFE ID of the SPIFFE bundle endpoint
	// server.
	EndpointSpiffeId string `protobuf:"bytes,1,opt,name=endpoint_spiffe_id,json=endpointSpiffeId,proto3" json:"endpoint_spiffe_id,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*HTTPSSPIFFEProfile) ProtoMessage() {}

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

func (x *HTTPSSPIFFEProfile) GetEndpointSpiffeId() string {
	if x != nil {
		return x.EndpointSpiffeId
	}
	return ""
}

type HTTPSWebProfile struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*HTTPSWebProfile) ProtoMessage() {}

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

type FederationRelationshipMask struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// bundle_endpoint_url field mask.
	BundleEndpointUrl bool `protobuf:"varint,1,opt,name=bundle_endpoint_url,json=bundleEndpointUrl,proto3" json:"bundle_endpoint_url,omitempty"`
	// bundle_endpoint_profile field mask.
	BundleEndpointProfile bool `protobuf:"varint,2,opt,name=bundle_endpoint_profile,json=bundleEndpointProfile,proto3" json:"bundle_endpoint_profile,omitempty"`
	// trust_domain_bundle field mask.
	TrustDomainBundle bool `protobuf:"varint,3,opt,name=trust_domain_bundle,json=trustDomainBundle,proto3" json:"trust_domain_bundle,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*FederationRelationshipMask) ProtoMessage() {}

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

func (x *FederationRelationshipMask) GetBundleEndpointUrl() bool {
	if x != nil {
		return x.BundleEndpointUrl
	}
	return false
}

func (x *FederationRelationshipMask) GetBundleEndpointProfile() bool {
	if x != nil {
		return x.BundleEndpointProfile
	}
	return false
}

func (x *FederationRelationshipMask) GetTrustDomainBundle() bool {
	if x != nil {
		return x.TrustDomainBundle
	}
	return false
}

var File_spire_api_types_federationrelationship_proto protoreflect.FileDescriptor

const file_spire_api_types_federationrelationship_proto_rawDesc = "" +
	"\n" +
	",spire/api/types/federationrelationship.proto\x12\x0fspire.api.types\x1a\x1cspire/api/types/bundle.proto\"\xda\x02\n" +
	"\x16FederationRelationship\x12!\n" +
	"\ftrust_domain\x18\x01 \x01(\tR\vtrustDomain\x12.\n" +
	"\x13bundle_endpoint_url\x18\x02 \x01(\tR\x11bundleEndpointUrl\x12?\n" +
	"\thttps_web\x18\x03 \x01(\v2 .spire.api.types.HTTPSWebProfileH\x00R\bhttpsWeb\x12H\n" +
	"\fhttps_spiffe\x18\x04 \x01(\v2#.spire.api.types.HTTPSSPIFFEProfileH\x00R\vhttpsSpiffe\x12G\n" +
	"\x13trust_domain_bundle\x18\x05 \x01(\v2\x17.spire.api.types.BundleR\x11trustDomainBundleB\x19\n" +
	"\x17bundle_endpoint_profile\"B\n" +
	"\x12HTTPSSPIFFEProfile\x12,\n" +
	"\x12endpoint_spiffe_id\x18\x01 \x01(\tR\x10endpointSpiffeId\"\x11\n" +
	"\x0fHTTPSWebProfile\"\xb4\x01\n" +
	"\x1aFederationRelationshipMask\x12.\n" +
	"\x13bundle_endpoint_url\x18\x01 \x01(\bR\x11bundleEndpointUrl\x126\n" +
	"\x17bundle_endpoint_profile\x18\x02 \x01(\bR\x15bundleEndpointProfile\x12.\n" +
	"\x13trust_domain_bundle\x18\x03 \x01(\bR\x11trustDomainBundleB7Z5github.com/spiffe/spire-api-sdk/proto/spire/api/typesb\x06proto3"

var (
	file_spire_api_types_federationrelationship_proto_rawDescOnce sync.Once
	file_spire_api_types_federationrelationship_proto_rawDescData []byte
)

func file_spire_api_types_federationrelationship_proto_rawDescGZIP() []byte {
	file_spire_api_types_federationrelationship_proto_rawDescOnce.Do(func() {
		file_spire_api_types_federationrelationship_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_spire_api_types_federationrelationship_proto_rawDesc), len(file_spire_api_types_federationrelationship_proto_rawDesc)))
	})
	return file_spire_api_types_federationrelationship_proto_rawDescData
}

var file_spire_api_types_federationrelationship_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_spire_api_types_federationrelationship_proto_goTypes = []any{
	(*FederationRelationship)(nil),     // 0: spire.api.types.FederationRelationship
	(*HTTPSSPIFFEProfile)(nil),         // 1: spire.api.types.HTTPSSPIFFEProfile
	(*HTTPSWebProfile)(nil),            // 2: spire.api.types.HTTPSWebProfile
	(*FederationRelationshipMask)(nil), // 3: spire.api.types.FederationRelationshipMask
	(*Bundle)(nil),                     // 4: spire.api.types.Bundle
}
var file_spire_api_types_federationrelationship_proto_depIdxs = []int32{
	2, // 0: spire.api.types.FederationRelationship.https_web:type_name -> spire.api.types.HTTPSWebProfile
	1, // 1: spire.api.types.FederationRelationship.https_spiffe:type_name -> spire.api.types.HTTPSSPIFFEProfile
	4, // 2: spire.api.types.FederationRelationship.trust_domain_bundle:type_name -> spire.api.types.Bundle
	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_spire_api_types_federationrelationship_proto_init() }
func file_spire_api_types_federationrelationship_proto_init() {
	if File_spire_api_types_federationrelationship_proto != nil {
		return
	}
	file_spire_api_types_bundle_proto_init()
	file_spire_api_types_federationrelationship_proto_msgTypes[0].OneofWrappers = []any{
		(*FederationRelationship_HttpsWeb)(nil),
		(*FederationRelationship_HttpsSpiffe)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_spire_api_types_federationrelationship_proto_rawDesc), len(file_spire_api_types_federationrelationship_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_spire_api_types_federationrelationship_proto_goTypes,
		DependencyIndexes: file_spire_api_types_federationrelationship_proto_depIdxs,
		MessageInfos:      file_spire_api_types_federationrelationship_proto_msgTypes,
	}.Build()
	File_spire_api_types_federationrelationship_proto = out.File
	file_spire_api_types_federationrelationship_proto_goTypes = nil
	file_spire_api_types_federationrelationship_proto_depIdxs = nil
}
