// Code generated by protoc-gen-go. DO NOT EDIT.
// source: udpa/type/v1/typed_struct.proto

package udpa_type_v1

import (
	fmt "fmt"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	proto "github.com/golang/protobuf/proto"
	_struct "github.com/golang/protobuf/ptypes/struct"
	math "math"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

// A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that
// describes the type of the serialized message. This is very similar to google.protobuf.Any,
// instead of having protocol buffer binary, this employs google.protobuf.Struct as value.
//
// This message is intended to be embedded inside Any, so it shouldn't be directly referred
// from other UDPA messages.
//
// When packing an opaque extension config, packing the expected type into Any is preferred
// wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor
// is not available, for example if:
// - A control plane sends opaque message that is originally from external source in human readable
//   format such as JSON or YAML.
// - The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot
//   serialize the message in protocol buffer binary format.
// - The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension
//   uses. This has to be indicated in the DPLB capability negotiation.
//
// When a DPLB receives a TypedStruct in Any, it should:
// - Check if the type_url of the TypedStruct matches the type the extension expects.
// - Convert value to the type described in type_url and perform validation.
// TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link
// protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions).
type TypedStruct struct {
	// A URL that uniquely identifies the type of the serialize protocol buffer message.
	// This has same semantics and format described in google.protobuf.Any:
	// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
	TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
	// A JSON representation of the above specified type.
	Value                *_struct.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (m *TypedStruct) Reset()         { *m = TypedStruct{} }
func (m *TypedStruct) String() string { return proto.CompactTextString(m) }
func (*TypedStruct) ProtoMessage()    {}
func (*TypedStruct) Descriptor() ([]byte, []int) {
	return fileDescriptor_098110268becad8a, []int{0}
}

func (m *TypedStruct) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TypedStruct.Unmarshal(m, b)
}
func (m *TypedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TypedStruct.Marshal(b, m, deterministic)
}
func (m *TypedStruct) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TypedStruct.Merge(m, src)
}
func (m *TypedStruct) XXX_Size() int {
	return xxx_messageInfo_TypedStruct.Size(m)
}
func (m *TypedStruct) XXX_DiscardUnknown() {
	xxx_messageInfo_TypedStruct.DiscardUnknown(m)
}

var xxx_messageInfo_TypedStruct proto.InternalMessageInfo

func (m *TypedStruct) GetTypeUrl() string {
	if m != nil {
		return m.TypeUrl
	}
	return ""
}

func (m *TypedStruct) GetValue() *_struct.Struct {
	if m != nil {
		return m.Value
	}
	return nil
}

func init() {
	proto.RegisterType((*TypedStruct)(nil), "udpa.type.v1.TypedStruct")
}

func init() { proto.RegisterFile("udpa/type/v1/typed_struct.proto", fileDescriptor_098110268becad8a) }

var fileDescriptor_098110268becad8a = []byte{
	// 192 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2f, 0x4d, 0x29, 0x48,
	0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0xd5, 0x2f, 0x33, 0x04, 0xd3, 0x29, 0xf1, 0xc5, 0x25, 0x45, 0xa5,
	0xc9, 0x25, 0x7a, 0x05, 0x45,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