From 8a38e9643a2a574122442f9277c025d15fa118bd Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 17 Feb 2023 10:57:03 +0000 Subject: [PATCH] chore: Disable REGAPIC as no RPCs support it PiperOrigin-RevId: 510355900 Source-Link: https://github.com/googleapis/googleapis/commit/e0d18015cb8fdc07a5715360c5025fbb97c1b9f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7f3a291b900317b08746cf04dfe80027924edba2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2YzYTI5MWI5MDAzMTdiMDg3NDZjZjA0ZGZlODAwMjc5MjRlZGJhMiJ9 --- mediatranslation/apiv1beta1/doc.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/mediatranslation/apiv1beta1/doc.go b/mediatranslation/apiv1beta1/doc.go index 24bb22908bcd..cd0a9f663002 100644 --- a/mediatranslation/apiv1beta1/doc.go +++ b/mediatranslation/apiv1beta1/doc.go @@ -96,8 +96,6 @@ package mediatranslation // import "cloud.google.com/go/mediatranslation/apiv1be import ( "context" - "fmt" - "net/http" "os" "runtime" "strconv" @@ -186,22 +184,3 @@ func versionGo() string { } return "UNKNOWN" } - -// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result -// of receiving an unknown enum value. -func maybeUnknownEnum(err error) error { - if strings.Contains(err.Error(), "invalid value for enum type") { - err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) - } - return err -} - -// buildHeaders extracts metadata from the outgoing context, joins it with any other -// given metadata, and converts them into a http.Header. -func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { - if cmd, ok := metadata.FromOutgoingContext(ctx); ok { - mds = append(mds, cmd) - } - md := metadata.Join(mds...) - return http.Header(md) -}