diff --git a/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go b/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go index bc0946e1a2d..9734f043fc6 100644 --- a/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go +++ b/examples/internal/proto/examplepb/visibility_rule_echo_service.pb.go @@ -131,6 +131,52 @@ func (VisibilityRuleSimpleMessage_VisibilityEnum) EnumDescriptor() ([]byte, []in return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{1, 0} } +type VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault int32 + +const ( + VisibilityRuleSimpleMessage_VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault = 0 + VisibilityRuleSimpleMessage_VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault = 1 +) + +// Enum value maps for VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault. +var ( + VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault_name = map[int32]string{ + 0: "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + 1: "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE", + } + VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault_value = map[string]int32{ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED": 0, + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE": 1, + } +) + +func (x VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) Enum() *VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault { + p := new(VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) + *p = x + return p +} + +func (x VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) Descriptor() protoreflect.EnumDescriptor { + return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes[2].Descriptor() +} + +func (VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) Type() protoreflect.EnumType { + return &file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes[2] +} + +func (x VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault.Descriptor instead. +func (VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault) EnumDescriptor() ([]byte, []int) { + return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescGZIP(), []int{1, 1} +} + // Embedded represents a message embedded in SimpleMessage. type VisibilityRuleEmbedded struct { state protoimpl.MessageState @@ -258,10 +304,11 @@ type VisibilityRuleSimpleMessage struct { // // *VisibilityRuleSimpleMessage_En // *VisibilityRuleSimpleMessage_No - Ext isVisibilityRuleSimpleMessage_Ext `protobuf_oneof:"ext"` - InternalField string `protobuf:"bytes,8,opt,name=internal_field,json=internalField,proto3" json:"internal_field,omitempty"` - PreviewField string `protobuf:"bytes,9,opt,name=preview_field,json=previewField,proto3" json:"preview_field,omitempty"` - AnEnum VisibilityRuleSimpleMessage_VisibilityEnum `protobuf:"varint,10,opt,name=an_enum,json=anEnum,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage_VisibilityEnum" json:"an_enum,omitempty"` + Ext isVisibilityRuleSimpleMessage_Ext `protobuf_oneof:"ext"` + InternalField string `protobuf:"bytes,8,opt,name=internal_field,json=internalField,proto3" json:"internal_field,omitempty"` + PreviewField string `protobuf:"bytes,9,opt,name=preview_field,json=previewField,proto3" json:"preview_field,omitempty"` + AnEnum VisibilityRuleSimpleMessage_VisibilityEnum `protobuf:"varint,10,opt,name=an_enum,json=anEnum,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage_VisibilityEnum" json:"an_enum,omitempty"` + AhiddenDefaultEnum VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault `protobuf:"varint,11,opt,name=ahidden_default_enum,json=ahiddenDefaultEnum,proto3,enum=grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault" json:"ahidden_default_enum,omitempty"` } func (x *VisibilityRuleSimpleMessage) Reset() { @@ -378,6 +425,13 @@ func (x *VisibilityRuleSimpleMessage) GetAnEnum() VisibilityRuleSimpleMessage_Vi return VisibilityRuleSimpleMessage_VISIBILITY_ENUM_UNSPECIFIED } +func (x *VisibilityRuleSimpleMessage) GetAhiddenDefaultEnum() VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault { + if x != nil { + return x.AhiddenDefaultEnum + } + return VisibilityRuleSimpleMessage_VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED +} + type isVisibilityRuleSimpleMessage_Code interface { isVisibilityRuleSimpleMessage_Code() } @@ -549,7 +603,7 @@ var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_ra 0x28, 0x09, 0x42, 0x18, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x06, 0x0a, 0x04, - 0x6d, 0x61, 0x72, 0x6b, 0x22, 0xf2, 0x05, 0x0a, 0x1b, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x9c, 0x08, 0x0a, 0x1b, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -584,61 +638,67 @@ var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_ra 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x06, 0x61, 0x6e, 0x45, 0x6e, - 0x75, 0x6d, 0x22, 0xb5, 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, - 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, - 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x4c, - 0x45, 0x10, 0x01, 0x12, 0x2e, 0x0a, 0x18, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, - 0x02, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, - 0x4e, 0x41, 0x4c, 0x12, 0x35, 0x0a, 0x17, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x10, 0x03, - 0x1a, 0x18, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, - 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x42, 0x06, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x24, 0x56, 0x69, - 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x78, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x52, 0x0a, 0x73, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x65, 0x0a, 0x04, - 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, + 0x75, 0x6d, 0x12, 0x99, 0x01, 0x0a, 0x14, 0x61, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x5f, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x67, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, + 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x12, 0x61, 0x68, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x22, 0xb5, + 0x01, 0x0a, 0x0e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, + 0x6d, 0x12, 0x1f, 0x0a, 0x1b, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, + 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, + 0x2e, 0x0a, 0x18, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x02, 0x1a, 0x10, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x12, + 0x35, 0x0a, 0x17, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x10, 0x03, 0x1a, 0x18, 0xfa, 0xd2, + 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, + 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x22, 0x8b, 0x01, 0x0a, 0x1b, 0x56, 0x69, 0x73, 0x69, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x75, 0x6d, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x40, 0x0a, 0x2a, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, + 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x48, 0x49, 0x44, 0x44, 0x45, 0x4e, + 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, + 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x12, 0x2a, 0x0a, 0x26, 0x56, 0x49, 0x53, 0x49, + 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x48, 0x49, 0x44, 0x44, + 0x45, 0x4e, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, + 0x4c, 0x45, 0x10, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x05, 0x0a, 0x03, + 0x65, 0x78, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x24, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, + 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x78, 0x0a, 0x0b, + 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, + 0x65, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x65, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, + 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, 0x39, 0x0a, + 0x27, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, + 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, + 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x5b, 0x0a, 0x21, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, - 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x04, 0x65, - 0x6e, 0x75, 0x6d, 0x22, 0x39, 0x0a, 0x27, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, - 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x5b, - 0x0a, 0x21, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, - 0x45, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x12, 0x36, 0x0a, 0x32, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x5f, 0x50, - 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x32, 0x9b, 0x07, 0x0a, 0x19, - 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x63, - 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbf, 0x01, 0x0a, 0x04, 0x45, 0x63, - 0x68, 0x6f, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, - 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, - 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, - 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, - 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1d, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xdb, 0x01, 0x0a, 0x0c, - 0x45, 0x63, 0x68, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x4b, 0x2e, 0x67, + 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x36, 0x0a, + 0x32, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x55, 0x4c, 0x45, + 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, + 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x32, 0x9b, 0x07, 0x0a, 0x19, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0xbf, 0x01, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, @@ -648,62 +708,75 @@ var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_ra 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x31, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, - 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, - 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0xe1, 0x01, 0x0a, 0x0b, 0x45, 0x63, - 0x68, 0x6f, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x54, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xdb, 0x01, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, - 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x2f, 0xfa, 0xd2, - 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0xf9, 0x01, - 0x0a, 0x16, 0x45, 0x63, 0x68, 0x6f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e, - 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x45, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45, - 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, - 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x6e, - 0x64, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x32, 0x80, 0x02, 0x0a, 0x21, 0x56, 0x69, - 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0xc8, 0x01, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, - 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, - 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x42, 0x57, 0x5a, 0x55, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, - 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x3b, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x1a, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x31, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, + 0x41, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x12, 0xe1, 0x01, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x50, 0x72, 0x65, 0x76, + 0x69, 0x65, 0x77, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x75, 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x1a, 0x54, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, + 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x2f, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, + 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, + 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, + 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0xf9, 0x01, 0x0a, 0x16, 0x45, 0x63, 0x68, 0x6f, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x6e, 0x64, 0x50, 0x72, 0x65, 0x76, 0x69, + 0x65, 0x77, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, + 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, + 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x45, 0xfa, 0xd2, + 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x2c, 0x50, + 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, + 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x65, 0x77, 0x32, 0x80, 0x02, 0x0a, 0x21, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x63, + 0x68, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xc8, 0x01, 0x0a, 0x04, 0x45, 0x63, + 0x68, 0x6f, 0x12, 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x70, 0x62, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, + 0x6c, 0x65, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, + 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x26, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x1a, 0x10, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x42, 0x57, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x70, 0x62, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -718,37 +791,39 @@ func file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_r return file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDescData } -var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_goTypes = []any{ - (VisibilityRuleEnumInPreviewMethod)(0), // 0: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod - (VisibilityRuleSimpleMessage_VisibilityEnum)(0), // 1: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnum - (*VisibilityRuleEmbedded)(nil), // 2: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded - (*VisibilityRuleSimpleMessage)(nil), // 3: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - (*VisibilityRuleMessageInPreviewMethod)(nil), // 4: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod - (*VisibilityRuleSubMessageInPreviewMethod)(nil), // 5: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSubMessageInPreviewMethod + (VisibilityRuleEnumInPreviewMethod)(0), // 0: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod + (VisibilityRuleSimpleMessage_VisibilityEnum)(0), // 1: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnum + (VisibilityRuleSimpleMessage_VisibilityEnumHiddenDefault)(0), // 2: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnumHiddenDefault + (*VisibilityRuleEmbedded)(nil), // 3: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded + (*VisibilityRuleSimpleMessage)(nil), // 4: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + (*VisibilityRuleMessageInPreviewMethod)(nil), // 5: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod + (*VisibilityRuleSubMessageInPreviewMethod)(nil), // 6: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSubMessageInPreviewMethod } var file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_depIdxs = []int32{ - 2, // 0: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.status:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded - 2, // 1: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.no:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded + 3, // 0: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.status:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded + 3, // 1: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.no:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEmbedded 1, // 2: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.an_enum:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnum - 5, // 3: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod.sub_message:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSubMessageInPreviewMethod - 0, // 4: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod.enum:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod - 3, // 5: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.Echo:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 6: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternal:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 7: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoPreview:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 8: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternalAndPreview:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 9: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService.Echo:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 10: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 11: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternal:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 4, // 12: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoPreview:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod - 3, // 13: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternalAndPreview:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 3, // 14: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] 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 + 2, // 3: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.ahidden_default_enum:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage.VisibilityEnumHiddenDefault + 6, // 4: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod.sub_message:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSubMessageInPreviewMethod + 0, // 5: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod.enum:type_name -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEnumInPreviewMethod + 4, // 6: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.Echo:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 7: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternal:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 8: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoPreview:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 9: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternalAndPreview:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 10: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService.Echo:input_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 11: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 12: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternal:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 5, // 13: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoPreview:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleMessageInPreviewMethod + 4, // 14: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleEchoService.EchoInternalAndPreview:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 4, // 15: grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleInternalEchoService.Echo:output_type -> grpc.gateway.examples.internal.proto.examplepb.VisibilityRuleSimpleMessage + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_init() } @@ -773,7 +848,7 @@ func file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_i File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_examples_internal_proto_examplepb_visibility_rule_echo_service_proto_rawDesc, - NumEnums: 2, + NumEnums: 3, NumMessages: 4, NumExtensions: 0, NumServices: 2, diff --git a/examples/internal/proto/examplepb/visibility_rule_echo_service.proto b/examples/internal/proto/examplepb/visibility_rule_echo_service.proto index 36b63738308..5e70af14ad2 100644 --- a/examples/internal/proto/examplepb/visibility_rule_echo_service.proto +++ b/examples/internal/proto/examplepb/visibility_rule_echo_service.proto @@ -36,6 +36,11 @@ message VisibilityRuleSimpleMessage { VISIBILITY_ENUM_PREVIEW = 3 [(google.api.value_visibility).restriction = "INTERNAL,PREVIEW"]; } + enum VisibilityEnumHiddenDefault { + VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED = 0 [(google.api.value_visibility).restriction = "INTERNAL"]; + VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE = 1; + } + // Id represents the message identifier. string id = 1; int64 num = 2; @@ -51,6 +56,7 @@ message VisibilityRuleSimpleMessage { string internal_field = 8 [(google.api.field_visibility).restriction = "INTERNAL"]; string preview_field = 9 [(google.api.field_visibility).restriction = "INTERNAL,PREVIEW"]; VisibilityEnum an_enum = 10; + VisibilityEnumHiddenDefault ahidden_default_enum = 11; } // MessageInPreviewMethod doesn't define its own visibility restrictions, diff --git a/examples/internal/proto/examplepb/visibility_rule_enums_as_ints_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_enums_as_ints_echo_service.swagger.json index dd75f133e37..b123055cfe9 100644 --- a/examples/internal/proto/examplepb/visibility_rule_enums_as_ints_echo_service.swagger.json +++ b/examples/internal/proto/examplepb/visibility_rule_enums_as_ints_echo_service.swagger.json @@ -106,6 +106,16 @@ 1 ], "default": 0 + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "integer", + "enum": [ + 1 + ], + "default": 0 } ], "tags": [ @@ -124,6 +134,14 @@ ], "default": 0 }, + "VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault": { + "type": "integer", + "format": "int32", + "enum": [ + 1 + ], + "default": 0 + }, "examplepbVisibilityRuleEmbedded": { "type": "object", "properties": { @@ -167,6 +185,9 @@ }, "anEnum": { "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum" + }, + "ahiddenDefaultEnum": { + "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault" } }, "description": "SimpleMessage represents a simple message sent to the Echo service." diff --git a/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json index a3b36158e30..4069716dbdd 100644 --- a/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json +++ b/examples/internal/proto/examplepb/visibility_rule_internal_echo_service.swagger.json @@ -147,6 +147,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -281,6 +292,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -415,6 +437,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -549,6 +582,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -568,6 +612,14 @@ ], "default": "VISIBILITY_ENUM_UNSPECIFIED" }, + "VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault": { + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" + }, "examplepbVisibilityRuleEmbedded": { "type": "object", "properties": { @@ -623,6 +675,9 @@ }, "anEnum": { "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum" + }, + "ahiddenDefaultEnum": { + "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault" } }, "description": "SimpleMessage represents a simple message sent to the Echo service." diff --git a/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json index a6d98be42b3..477e08c4227 100644 --- a/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json +++ b/examples/internal/proto/examplepb/visibility_rule_none_echo_service.swagger.json @@ -106,6 +106,15 @@ "VISIBILITY_ENUM_VISIBLE" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ] } ], "tags": [ @@ -123,6 +132,12 @@ ], "default": "VISIBILITY_ENUM_UNSPECIFIED" }, + "VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault": { + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ] + }, "examplepbVisibilityRuleEmbedded": { "type": "object", "properties": { @@ -166,6 +181,9 @@ }, "anEnum": { "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum" + }, + "ahiddenDefaultEnum": { + "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault" } }, "description": "SimpleMessage represents a simple message sent to the Echo service." diff --git a/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json index b8b7fd280d3..047a672deb5 100644 --- a/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json +++ b/examples/internal/proto/examplepb/visibility_rule_preview_and_internal_echo_service.swagger.json @@ -147,6 +147,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -281,6 +292,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -415,6 +437,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -549,6 +582,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -683,6 +727,17 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" } ], "tags": [ @@ -702,6 +757,14 @@ ], "default": "VISIBILITY_ENUM_UNSPECIFIED" }, + "VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault": { + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED", + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ], + "default": "VISIBILITY_ENUM_HIDDEN_DEFAULT_UNSPECIFIED" + }, "examplepbVisibilityRuleEmbedded": { "type": "object", "properties": { @@ -780,6 +843,9 @@ }, "anEnum": { "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum" + }, + "ahiddenDefaultEnum": { + "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault" } }, "description": "SimpleMessage represents a simple message sent to the Echo service." diff --git a/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json b/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json index 45bd96cf643..04164e13ab8 100644 --- a/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json +++ b/examples/internal/proto/examplepb/visibility_rule_preview_echo_service.swagger.json @@ -125,6 +125,15 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ] } ], "tags": [ @@ -240,6 +249,15 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ] } ], "tags": [ @@ -355,6 +373,15 @@ "VISIBILITY_ENUM_PREVIEW" ], "default": "VISIBILITY_ENUM_UNSPECIFIED" + }, + { + "name": "ahiddenDefaultEnum", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ] } ], "tags": [ @@ -373,6 +400,12 @@ ], "default": "VISIBILITY_ENUM_UNSPECIFIED" }, + "VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault": { + "type": "string", + "enum": [ + "VISIBILITY_ENUM_HIDDEN_DEFAULT_VISIBLE" + ] + }, "examplepbVisibilityRuleEmbedded": { "type": "object", "properties": { @@ -445,6 +478,9 @@ }, "anEnum": { "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnum" + }, + "ahiddenDefaultEnum": { + "$ref": "#/definitions/VisibilityRuleSimpleMessageVisibilityEnumHiddenDefault" } }, "description": "SimpleMessage represents a simple message sent to the Echo service." diff --git a/protoc-gen-openapiv2/internal/genopenapi/template.go b/protoc-gen-openapiv2/internal/genopenapi/template.go index 40fd3e6206c..07ac08b949d 100644 --- a/protoc-gen-openapiv2/internal/genopenapi/template.go +++ b/protoc-gen-openapiv2/internal/genopenapi/template.go @@ -150,6 +150,9 @@ func getEnumDefault(reg *descriptor.Registry, enum *descriptor.Enum) interface{} if !reg.GetOmitEnumDefaultValue() { for _, value := range enum.GetValue() { if value.GetNumber() == 0 { + if !isVisible(getEnumValueVisibilityOption(value), reg) { + return nil + } return value.GetName() } }