diff --git a/cmd/protoc-gen-go-aip/internal/genaip/resourcename.go b/cmd/protoc-gen-go-aip/internal/genaip/resourcename.go index b9ab5ee1cc..02eca653c3 100644 --- a/cmd/protoc-gen-go-aip/internal/genaip/resourcename.go +++ b/cmd/protoc-gen-go-aip/internal/genaip/resourcename.go @@ -353,6 +353,7 @@ func (r resourceNameCodeGenerator) generateMultiPatternInterface(g *protogen.Gen g.P("type ", r.MultiPatternInterfaceName(), " interface {") g.P(fmtStringer) g.P("MarshalString() (string, error)") + g.P("ContainsWildcard() bool") g.P("}") return nil } diff --git a/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/multipattern/testdata_aip.go b/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/multipattern/testdata_aip.go index 7ffd53e98e..aa5f429c88 100644 --- a/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/multipattern/testdata_aip.go +++ b/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/multipattern/testdata_aip.go @@ -16,6 +16,7 @@ import ( type BookMultiPatternResourceName interface { fmt.Stringer MarshalString() (string, error) + ContainsWildcard() bool } func ParseBookMultiPatternResourceName(name string) (BookMultiPatternResourceName, error) { @@ -147,6 +148,7 @@ func (n *PublishersBookResourceName) UnmarshalString(name string) error { type ShelfMultiPatternResourceName interface { fmt.Stringer MarshalString() (string, error) + ContainsWildcard() bool } func ParseShelfMultiPatternResourceName(name string) (ShelfMultiPatternResourceName, error) { diff --git a/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/originallysinglepattern/testdata_aip.go b/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/originallysinglepattern/testdata_aip.go index ce98fa8cf5..7f750cd4a7 100644 --- a/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/originallysinglepattern/testdata_aip.go +++ b/cmd/protoc-gen-go-aip/internal/genaip/testdata/test/originallysinglepattern/testdata_aip.go @@ -16,6 +16,7 @@ import ( type BookMultiPatternResourceName interface { fmt.Stringer MarshalString() (string, error) + ContainsWildcard() bool } func ParseBookMultiPatternResourceName(name string) (BookMultiPatternResourceName, error) { @@ -211,6 +212,7 @@ func (n *PublishersBookResourceName) UnmarshalString(name string) error { type ShelfMultiPatternResourceName interface { fmt.Stringer MarshalString() (string, error) + ContainsWildcard() bool } func ParseShelfMultiPatternResourceName(name string) (ShelfMultiPatternResourceName, error) {