diff --git a/envoy/COMMIT b/envoy/COMMIT index 88555f5456..7ae859d9b8 100644 --- a/envoy/COMMIT +++ b/envoy/COMMIT @@ -1 +1 @@ -8670309bce9a488ccfc04a87d0c4367ca59c4179 \ No newline at end of file +a1181348a4f6df6011843a141814e28840d23eb5 \ No newline at end of file diff --git a/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go b/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go new file mode 100755 index 0000000000..ec1dd019d7 --- /dev/null +++ b/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.go @@ -0,0 +1,620 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto + +package networkv3 + +import ( + _ "github.com/cncf/xds/go/udpa/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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) +) + +// Specifies that matching should be performed by the destination IP address. +type DestinationIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DestinationIPInput) Reset() { + *x = DestinationIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationIPInput) ProtoMessage() {} + +func (x *DestinationIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationIPInput.ProtoReflect.Descriptor instead. +func (*DestinationIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{0} +} + +// Specifies that matching should be performed by the destination port. +type DestinationPortInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DestinationPortInput) Reset() { + *x = DestinationPortInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationPortInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationPortInput) ProtoMessage() {} + +func (x *DestinationPortInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationPortInput.ProtoReflect.Descriptor instead. +func (*DestinationPortInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{1} +} + +// Specifies that matching should be performed by the source IP address. +type SourceIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourceIPInput) Reset() { + *x = SourceIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceIPInput) ProtoMessage() {} + +func (x *SourceIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceIPInput.ProtoReflect.Descriptor instead. +func (*SourceIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{2} +} + +// Specifies that matching should be performed by the source port. +type SourcePortInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourcePortInput) Reset() { + *x = SourcePortInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourcePortInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourcePortInput) ProtoMessage() {} + +func (x *SourcePortInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourcePortInput.ProtoReflect.Descriptor instead. +func (*SourcePortInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{3} +} + +// Input that matches by the directly connected source IP address (this +// will only be different from the source IP address when using a listener +// filter that overrides the source address, such as the :ref:`Proxy Protocol +// listener filter `). +type DirectSourceIPInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DirectSourceIPInput) Reset() { + *x = DirectSourceIPInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DirectSourceIPInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DirectSourceIPInput) ProtoMessage() {} + +func (x *DirectSourceIPInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DirectSourceIPInput.ProtoReflect.Descriptor instead. +func (*DirectSourceIPInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{4} +} + +// Input that matches by the source IP type. +// Specifies the source IP match type. The values include: +// +// * ``local`` - matches a connection originating from the same host, +type SourceTypeInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SourceTypeInput) Reset() { + *x = SourceTypeInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SourceTypeInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceTypeInput) ProtoMessage() {} + +func (x *SourceTypeInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceTypeInput.ProtoReflect.Descriptor instead. +func (*SourceTypeInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{5} +} + +// Input that matches by the requested server name (e.g. SNI in TLS). +// +// :ref:`TLS Inspector ` provides the requested server name based on SNI, +// when TLS protocol is detected. +type ServerNameInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ServerNameInput) Reset() { + *x = ServerNameInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNameInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNameInput) ProtoMessage() {} + +func (x *ServerNameInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNameInput.ProtoReflect.Descriptor instead. +func (*ServerNameInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{6} +} + +// Input that matches by the transport protocol. +// +// Suggested values include: +// +// * ``raw_buffer`` - default, used when no transport protocol is detected, +// * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector ` +// when TLS protocol is detected. +type TransportProtocolInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TransportProtocolInput) Reset() { + *x = TransportProtocolInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransportProtocolInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransportProtocolInput) ProtoMessage() {} + +func (x *TransportProtocolInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransportProtocolInput.ProtoReflect.Descriptor instead. +func (*TransportProtocolInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{7} +} + +// List of quoted and comma-separated requested application protocols. The list consists of a +// single negotiated application protocol once the network stream is established. +// +// Examples: +// +// * ``'h2','http/1.1'`` +// * ``'h2c'``` +// +// Suggested values in the list include: +// +// * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector +// ` and :ref:`envoy.filters.listener.http_inspector +// `, +// * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector ` +// * ``h2c`` - set by :ref:`envoy.filters.listener.http_inspector ` +// +// .. attention:: +// +// Currently, :ref:`TLS Inspector ` provides +// application protocol detection based on the requested +// `ALPN `_ values. +// +// However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet, +// and matching on values other than ``h2`` is going to lead to a lot of false negatives, +// unless all connecting clients are known to use ALPN. +type ApplicationProtocolInput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ApplicationProtocolInput) Reset() { + *x = ApplicationProtocolInput{} + if protoimpl.UnsafeEnabled { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplicationProtocolInput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplicationProtocolInput) ProtoMessage() {} + +func (x *ApplicationProtocolInput) ProtoReflect() protoreflect.Message { + mi := &file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplicationProtocolInput.ProtoReflect.Descriptor instead. +func (*ApplicationProtocolInput) Descriptor() ([]byte, []int) { + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP(), []int{8} +} + +var File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto protoreflect.FileDescriptor + +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x50, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x49, 0x50, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x15, + 0x0a, 0x13, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x50, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x49, 0x6e, 0x70, 0x75, + 0x74, 0x42, 0xc5, 0x01, 0x0a, 0x40, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x63, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, + 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x76, 0x33, 0x3b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x76, + 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescOnce sync.Once + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData = file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc +) + +func file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescGZIP() []byte { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescOnce.Do(func() { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData) + }) + return file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDescData +} + +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes = []interface{}{ + (*DestinationIPInput)(nil), // 0: envoy.extensions.matching.common_inputs.network.v3.DestinationIPInput + (*DestinationPortInput)(nil), // 1: envoy.extensions.matching.common_inputs.network.v3.DestinationPortInput + (*SourceIPInput)(nil), // 2: envoy.extensions.matching.common_inputs.network.v3.SourceIPInput + (*SourcePortInput)(nil), // 3: envoy.extensions.matching.common_inputs.network.v3.SourcePortInput + (*DirectSourceIPInput)(nil), // 4: envoy.extensions.matching.common_inputs.network.v3.DirectSourceIPInput + (*SourceTypeInput)(nil), // 5: envoy.extensions.matching.common_inputs.network.v3.SourceTypeInput + (*ServerNameInput)(nil), // 6: envoy.extensions.matching.common_inputs.network.v3.ServerNameInput + (*TransportProtocolInput)(nil), // 7: envoy.extensions.matching.common_inputs.network.v3.TransportProtocolInput + (*ApplicationProtocolInput)(nil), // 8: envoy.extensions.matching.common_inputs.network.v3.ApplicationProtocolInput +} +var file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_init() } +func file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_init() { + if File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationPortInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourcePortInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DirectSourceIPInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SourceTypeInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNameInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransportProtocolInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplicationProtocolInput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc, + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes, + DependencyIndexes: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs, + MessageInfos: file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_msgTypes, + }.Build() + File_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto = out.File + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_rawDesc = nil + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_goTypes = nil + file_envoy_extensions_matching_common_inputs_network_v3_network_inputs_proto_depIdxs = nil +} diff --git a/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go b/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go new file mode 100755 index 0000000000..9df6297fea --- /dev/null +++ b/envoy/extensions/matching/common_inputs/network/v3/network_inputs.pb.validate.go @@ -0,0 +1,937 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: envoy/extensions/matching/common_inputs/network/v3/network_inputs.proto + +package networkv3 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on DestinationIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DestinationIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DestinationIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DestinationIPInputMultiError, or nil if none found. +func (m *DestinationIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DestinationIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DestinationIPInputMultiError(errors) + } + return nil +} + +// DestinationIPInputMultiError is an error wrapping multiple validation errors +// returned by DestinationIPInput.ValidateAll() if the designated constraints +// aren't met. +type DestinationIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DestinationIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DestinationIPInputMultiError) AllErrors() []error { return m } + +// DestinationIPInputValidationError is the validation error returned by +// DestinationIPInput.Validate if the designated constraints aren't met. +type DestinationIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DestinationIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DestinationIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DestinationIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DestinationIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DestinationIPInputValidationError) ErrorName() string { + return "DestinationIPInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DestinationIPInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDestinationIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DestinationIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DestinationIPInputValidationError{} + +// Validate checks the field values on DestinationPortInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DestinationPortInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DestinationPortInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DestinationPortInputMultiError, or nil if none found. +func (m *DestinationPortInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DestinationPortInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DestinationPortInputMultiError(errors) + } + return nil +} + +// DestinationPortInputMultiError is an error wrapping multiple validation +// errors returned by DestinationPortInput.ValidateAll() if the designated +// constraints aren't met. +type DestinationPortInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DestinationPortInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DestinationPortInputMultiError) AllErrors() []error { return m } + +// DestinationPortInputValidationError is the validation error returned by +// DestinationPortInput.Validate if the designated constraints aren't met. +type DestinationPortInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DestinationPortInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DestinationPortInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DestinationPortInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DestinationPortInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DestinationPortInputValidationError) ErrorName() string { + return "DestinationPortInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DestinationPortInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDestinationPortInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DestinationPortInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DestinationPortInputValidationError{} + +// Validate checks the field values on SourceIPInput with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SourceIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourceIPInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SourceIPInputMultiError, or +// nil if none found. +func (m *SourceIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourceIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourceIPInputMultiError(errors) + } + return nil +} + +// SourceIPInputMultiError is an error wrapping multiple validation errors +// returned by SourceIPInput.ValidateAll() if the designated constraints +// aren't met. +type SourceIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourceIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourceIPInputMultiError) AllErrors() []error { return m } + +// SourceIPInputValidationError is the validation error returned by +// SourceIPInput.Validate if the designated constraints aren't met. +type SourceIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourceIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourceIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourceIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourceIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourceIPInputValidationError) ErrorName() string { return "SourceIPInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourceIPInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSourceIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourceIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourceIPInputValidationError{} + +// Validate checks the field values on SourcePortInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *SourcePortInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourcePortInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SourcePortInputMultiError, or nil if none found. +func (m *SourcePortInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourcePortInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourcePortInputMultiError(errors) + } + return nil +} + +// SourcePortInputMultiError is an error wrapping multiple validation errors +// returned by SourcePortInput.ValidateAll() if the designated constraints +// aren't met. +type SourcePortInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourcePortInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourcePortInputMultiError) AllErrors() []error { return m } + +// SourcePortInputValidationError is the validation error returned by +// SourcePortInput.Validate if the designated constraints aren't met. +type SourcePortInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourcePortInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourcePortInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourcePortInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourcePortInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourcePortInputValidationError) ErrorName() string { return "SourcePortInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourcePortInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSourcePortInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourcePortInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourcePortInputValidationError{} + +// Validate checks the field values on DirectSourceIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DirectSourceIPInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DirectSourceIPInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DirectSourceIPInputMultiError, or nil if none found. +func (m *DirectSourceIPInput) ValidateAll() error { + return m.validate(true) +} + +func (m *DirectSourceIPInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DirectSourceIPInputMultiError(errors) + } + return nil +} + +// DirectSourceIPInputMultiError is an error wrapping multiple validation +// errors returned by DirectSourceIPInput.ValidateAll() if the designated +// constraints aren't met. +type DirectSourceIPInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DirectSourceIPInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DirectSourceIPInputMultiError) AllErrors() []error { return m } + +// DirectSourceIPInputValidationError is the validation error returned by +// DirectSourceIPInput.Validate if the designated constraints aren't met. +type DirectSourceIPInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DirectSourceIPInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DirectSourceIPInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DirectSourceIPInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DirectSourceIPInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DirectSourceIPInputValidationError) ErrorName() string { + return "DirectSourceIPInputValidationError" +} + +// Error satisfies the builtin error interface +func (e DirectSourceIPInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sDirectSourceIPInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DirectSourceIPInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DirectSourceIPInputValidationError{} + +// Validate checks the field values on SourceTypeInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *SourceTypeInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourceTypeInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SourceTypeInputMultiError, or nil if none found. +func (m *SourceTypeInput) ValidateAll() error { + return m.validate(true) +} + +func (m *SourceTypeInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SourceTypeInputMultiError(errors) + } + return nil +} + +// SourceTypeInputMultiError is an error wrapping multiple validation errors +// returned by SourceTypeInput.ValidateAll() if the designated constraints +// aren't met. +type SourceTypeInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourceTypeInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourceTypeInputMultiError) AllErrors() []error { return m } + +// SourceTypeInputValidationError is the validation error returned by +// SourceTypeInput.Validate if the designated constraints aren't met. +type SourceTypeInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourceTypeInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourceTypeInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourceTypeInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourceTypeInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourceTypeInputValidationError) ErrorName() string { return "SourceTypeInputValidationError" } + +// Error satisfies the builtin error interface +func (e SourceTypeInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSourceTypeInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourceTypeInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourceTypeInputValidationError{} + +// Validate checks the field values on ServerNameInput with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *ServerNameInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ServerNameInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ServerNameInputMultiError, or nil if none found. +func (m *ServerNameInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ServerNameInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ServerNameInputMultiError(errors) + } + return nil +} + +// ServerNameInputMultiError is an error wrapping multiple validation errors +// returned by ServerNameInput.ValidateAll() if the designated constraints +// aren't met. +type ServerNameInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ServerNameInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ServerNameInputMultiError) AllErrors() []error { return m } + +// ServerNameInputValidationError is the validation error returned by +// ServerNameInput.Validate if the designated constraints aren't met. +type ServerNameInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ServerNameInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ServerNameInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ServerNameInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ServerNameInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ServerNameInputValidationError) ErrorName() string { return "ServerNameInputValidationError" } + +// Error satisfies the builtin error interface +func (e ServerNameInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sServerNameInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ServerNameInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ServerNameInputValidationError{} + +// Validate checks the field values on TransportProtocolInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *TransportProtocolInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransportProtocolInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// TransportProtocolInputMultiError, or nil if none found. +func (m *TransportProtocolInput) ValidateAll() error { + return m.validate(true) +} + +func (m *TransportProtocolInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return TransportProtocolInputMultiError(errors) + } + return nil +} + +// TransportProtocolInputMultiError is an error wrapping multiple validation +// errors returned by TransportProtocolInput.ValidateAll() if the designated +// constraints aren't met. +type TransportProtocolInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransportProtocolInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransportProtocolInputMultiError) AllErrors() []error { return m } + +// TransportProtocolInputValidationError is the validation error returned by +// TransportProtocolInput.Validate if the designated constraints aren't met. +type TransportProtocolInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TransportProtocolInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TransportProtocolInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TransportProtocolInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TransportProtocolInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TransportProtocolInputValidationError) ErrorName() string { + return "TransportProtocolInputValidationError" +} + +// Error satisfies the builtin error interface +func (e TransportProtocolInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sTransportProtocolInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TransportProtocolInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TransportProtocolInputValidationError{} + +// Validate checks the field values on ApplicationProtocolInput with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ApplicationProtocolInput) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ApplicationProtocolInput with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ApplicationProtocolInputMultiError, or nil if none found. +func (m *ApplicationProtocolInput) ValidateAll() error { + return m.validate(true) +} + +func (m *ApplicationProtocolInput) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ApplicationProtocolInputMultiError(errors) + } + return nil +} + +// ApplicationProtocolInputMultiError is an error wrapping multiple validation +// errors returned by ApplicationProtocolInput.ValidateAll() if the designated +// constraints aren't met. +type ApplicationProtocolInputMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ApplicationProtocolInputMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ApplicationProtocolInputMultiError) AllErrors() []error { return m } + +// ApplicationProtocolInputValidationError is the validation error returned by +// ApplicationProtocolInput.Validate if the designated constraints aren't met. +type ApplicationProtocolInputValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ApplicationProtocolInputValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ApplicationProtocolInputValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ApplicationProtocolInputValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ApplicationProtocolInputValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ApplicationProtocolInputValidationError) ErrorName() string { + return "ApplicationProtocolInputValidationError" +} + +// Error satisfies the builtin error interface +func (e ApplicationProtocolInputValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sApplicationProtocolInput.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ApplicationProtocolInputValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ApplicationProtocolInputValidationError{}