Debian Codegraph @

shopping/merchant/accounts/apiv1/developer_registration_client.go

raw
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go_gapic. DO NOT EDIT.
16
17 package accounts
18
19 import (
20 "bytes"
21 "context"
22 "fmt"
23 "log/slog"
24 "math"
25 "net/http"
26 "net/url"
27 "time"
28
29 accountspb "cloud.google.com/go/shopping/merchant/accounts/apiv1/accountspb"
30 gax "github.com/googleapis/gax-go/v2"
31 "google.golang.org/api/option"
32 "google.golang.org/api/option/internaloption"
33 gtransport "google.golang.org/api/transport/grpc"
34 httptransport "google.golang.org/api/transport/http"
35 "google.golang.org/grpc"
36 "google.golang.org/grpc/codes"
37 "google.golang.org/protobuf/encoding/protojson"
38 )
39
40 var newDeveloperRegistrationClientHook clientHook
41
42 // DeveloperRegistrationCallOptions contains the retry settings for each method of DeveloperRegistrationClient.
43 type DeveloperRegistrationCallOptions struct {
44 RegisterGcp []gax.CallOption
45 GetDeveloperRegistration []gax.CallOption
46 UnregisterGcp []gax.CallOption
47 }
48
49 func defaultDeveloperRegistrationGRPCClientOptions() []option.ClientOption {
50 return []option.ClientOption{
51 internaloption.WithDefaultEndpoint("merchantapi.googleapis.com:443"),
52 internaloption.WithDefaultEndpointTemplate("merchantapi.UNIVERSE_DOMAIN:443"),
53 internaloption.WithDefaultMTLSEndpoint("merchantapi.mtls.googleapis.com:443"),
54 internaloption.WithDefaultUniverseDomain("googleapis.com"),
55 internaloption.WithDefaultAudience("https://merchantapi.googleapis.com/"),
56 internaloption.WithDefaultScopes(DefaultAuthScopes()...),
57 internaloption.EnableJwtWithScope(),
58 internaloption.EnableNewAuthLibrary(),
59 option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
60 grpc.MaxCallRecvMsgSize(math.MaxInt32))),
61 }
62 }
63
64 func defaultDeveloperRegistrationCallOptions() *DeveloperRegistrationCallOptions {
65 return &DeveloperRegistrationCallOptions{
66 RegisterGcp: []gax.CallOption{
67 gax.WithTimeout(60000 * time.Millisecond),
68 gax.WithRetry(func() gax.Retryer {
69 return gax.OnCodes([]codes.Code{
70 codes.Unavailable,
71 }, gax.Backoff{
72 Initial: 1000 * time.Millisecond,
73 Max: 10000 * time.Millisecond,
74 Multiplier: 1.30,
75 })
76 }),
77 },
78 GetDeveloperRegistration: []gax.CallOption{
79 gax.WithTimeout(60000 * time.Millisecond),
80 gax.WithRetry(func() gax.Retryer {
81 return gax.OnCodes([]codes.Code{
82 codes.Unavailable,
83 }, gax.Backoff{
84 Initial: 1000 * time.Millisecond,
85 Max: 10000 * time.Millisecond,
86 Multiplier: 1.30,
87 })
88 }),
89 },
90 UnregisterGcp: []gax.CallOption{
91 gax.WithTimeout(60000 * time.Millisecond),
92 gax.WithRetry(func() gax.Retryer {
93 return gax.OnCodes([]codes.Code{
94 codes.Unavailable,
95 }, gax.Backoff{
96 Initial: 1000 * time.Millisecond,
97 Max: 10000 * time.Millisecond,
98 Multiplier: 1.30,
99 })
100 }),
101 },
102 }
103 }
104
105 func defaultDeveloperRegistrationRESTCallOptions() *DeveloperRegistrationCallOptions {
106 return &DeveloperRegistrationCallOptions{
107 RegisterGcp: []gax.CallOption{
108 gax.WithTimeout(60000 * time.Millisecond),
109 gax.WithRetry(func() gax.Retryer {
110 return gax.OnHTTPCodes(gax.Backoff{
111 Initial: 1000 * time.Millisecond,
112 Max: 10000 * time.Millisecond,
113 Multiplier: 1.30,
114 },
115 http.StatusServiceUnavailable)
116 }),
117 },
118 GetDeveloperRegistration: []gax.CallOption{
119 gax.WithTimeout(60000 * time.Millisecond),
120 gax.WithRetry(func() gax.Retryer {
121 return gax.OnHTTPCodes(gax.Backoff{
122 Initial: 1000 * time.Millisecond,
123 Max: 10000 * time.Millisecond,
124 Multiplier: 1.30,
125 },
126 http.StatusServiceUnavailable)
127 }),
128 },
129 UnregisterGcp: []gax.CallOption{
130 gax.WithTimeout(60000 * time.Millisecond),
131 gax.WithRetry(func() gax.Retryer {
132 return gax.OnHTTPCodes(gax.Backoff{
133 Initial: 1000 * time.Millisecond,
134 Max: 10000 * time.Millisecond,
135 Multiplier: 1.30,
136 },
137 http.StatusServiceUnavailable)
138 }),
139 },
140 }
141 }
142
143 // internalDeveloperRegistrationClient is an interface that defines the methods available from Merchant API.
144 type internalDeveloperRegistrationClient interface {
145 Close() error
146 setGoogleClientInfo(...string)
147 Connection() *grpc.ClientConn
148 RegisterGcp(context.Context, *accountspb.RegisterGcpRequest, ...gax.CallOption) (*accountspb.DeveloperRegistration, error)
149 GetDeveloperRegistration(context.Context, *accountspb.GetDeveloperRegistrationRequest, ...gax.CallOption) (*accountspb.DeveloperRegistration, error)
150 UnregisterGcp(context.Context, *accountspb.UnregisterGcpRequest, ...gax.CallOption) error
151 }
152
153 // DeveloperRegistrationClient is a client for interacting with Merchant API.
154 // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
155 //
156 // Service to access Developer Registration.
157 type DeveloperRegistrationClient struct {
158 // The internal transport-dependent client.
159 internalClient internalDeveloperRegistrationClient
160
161 // The call options for this service.
162 CallOptions *DeveloperRegistrationCallOptions
163 }
164
165 // Wrapper methods routed to the internal client.
166
167 // Close closes the connection to the API service. The user should invoke this when
168 // the client is no longer required.
169 func (c *DeveloperRegistrationClient) Close() error {
170 return c.internalClient.Close()
171 }
172
173 // setGoogleClientInfo sets the name and version of the application in
174 // the `x-goog-api-client` header passed on each request. Intended for
175 // use by Google-written clients.
176 func (c *DeveloperRegistrationClient) setGoogleClientInfo(keyval ...string) {
177 c.internalClient.setGoogleClientInfo(keyval...)
178 }
179
180 // Connection returns a connection to the API service.
181 //
182 // Deprecated: Connections are now pooled so this method does not always
183 // return the same resource.
184 func (c *DeveloperRegistrationClient) Connection() *grpc.ClientConn {
185 return c.internalClient.Connection()
186 }
187
188 // RegisterGcp registers the GCP used for the API call to the shopping account passed in
189 // the request. Will create a user with an “API developer” and add the
190 // “developer_email” as a contact with “API notifications” email preference
191 // on.
192 func (c *DeveloperRegistrationClient) RegisterGcp(ctx context.Context, req *accountspb.RegisterGcpRequest, opts ...gax.CallOption) (*accountspb.DeveloperRegistration, error) {
193 return c.internalClient.RegisterGcp(ctx, req, opts...)
194 }
195
196 // GetDeveloperRegistration retrieves a developer registration for a merchant.
197 func (c *DeveloperRegistrationClient) GetDeveloperRegistration(ctx context.Context, req *accountspb.GetDeveloperRegistrationRequest, opts ...gax.CallOption) (*accountspb.DeveloperRegistration, error) {
198 return c.internalClient.GetDeveloperRegistration(ctx, req, opts...)
199 }
200
201 // UnregisterGcp unregister the calling GCP from the calling shopping account. Note that the
202 // GCP will still be able to access the API for at most 1 day from the
203 // unregister succussful call.
204 func (c *DeveloperRegistrationClient) UnregisterGcp(ctx context.Context, req *accountspb.UnregisterGcpRequest, opts ...gax.CallOption) error {
205 return c.internalClient.UnregisterGcp(ctx, req, opts...)
206 }
207
208 // developerRegistrationGRPCClient is a client for interacting with Merchant API over gRPC transport.
209 //
210 // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
211 type developerRegistrationGRPCClient struct {
212 // Connection pool of gRPC connections to the service.
213 connPool gtransport.ConnPool
214
215 // Points back to the CallOptions field of the containing DeveloperRegistrationClient
216 CallOptions **DeveloperRegistrationCallOptions
217
218 // The gRPC API client.
219 developerRegistrationClient accountspb.DeveloperRegistrationServiceClient
220
221 // The x-goog-* metadata to be sent with each request.
222 xGoogHeaders []string
223
224 logger *slog.Logger
225 }
226
227 // NewDeveloperRegistrationClient creates a new developer registration service client based on gRPC.
228 // The returned client must be Closed when it is done being used to clean up its underlying connections.
229 //
230 // Service to access Developer Registration.
231 func NewDeveloperRegistrationClient(ctx context.Context, opts ...option.ClientOption) (*DeveloperRegistrationClient, error) {
232 clientOpts := defaultDeveloperRegistrationGRPCClientOptions()
233 if newDeveloperRegistrationClientHook != nil {
234 hookOpts, err := newDeveloperRegistrationClientHook(ctx, clientHookParams{})
235 if err != nil {
236 return nil, err
237 }
238 clientOpts = append(clientOpts, hookOpts...)
239 }
240
241 connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)
242 if err != nil {
243 return nil, err
244 }
245 client := DeveloperRegistrationClient{CallOptions: defaultDeveloperRegistrationCallOptions()}
246
247 c := &developerRegistrationGRPCClient{
248 connPool: connPool,
249 developerRegistrationClient: accountspb.NewDeveloperRegistrationServiceClient(connPool),
250 CallOptions: &client.CallOptions,
251 logger: internaloption.GetLogger(opts),
252 }
253 c.setGoogleClientInfo()
254
255 client.internalClient = c
256
257 return &client, nil
258 }
259
260 // Connection returns a connection to the API service.
261 //
262 // Deprecated: Connections are now pooled so this method does not always
263 // return the same resource.
264 func (c *developerRegistrationGRPCClient) Connection() *grpc.ClientConn {
265 return c.connPool.Conn()
266 }
267
268 // setGoogleClientInfo sets the name and version of the application in
269 // the `x-goog-api-client` header passed on each request. Intended for
270 // use by Google-written clients.
271 func (c *developerRegistrationGRPCClient) setGoogleClientInfo(keyval ...string) {
272 kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
273 kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion)
274 c.xGoogHeaders = []string{
275 "x-goog-api-client", gax.XGoogHeader(kv...),
276 }
277 }
278
279 // Close closes the connection to the API service. The user should invoke this when
280 // the client is no longer required.
281 func (c *developerRegistrationGRPCClient) Close() error {
282 return c.connPool.Close()
283 }
284
285 // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
286 type developerRegistrationRESTClient struct {
287 // The http endpoint to connect to.
288 endpoint string
289
290 // The http client.
291 httpClient *http.Client
292
293 // The x-goog-* headers to be sent with each request.
294 xGoogHeaders []string
295
296 // Points back to the CallOptions field of the containing DeveloperRegistrationClient
297 CallOptions **DeveloperRegistrationCallOptions
298
299 logger *slog.Logger
300 }
301
302 // NewDeveloperRegistrationRESTClient creates a new developer registration service rest client.
303 //
304 // Service to access Developer Registration.
305 func NewDeveloperRegistrationRESTClient(ctx context.Context, opts ...option.ClientOption) (*DeveloperRegistrationClient, error) {
306 clientOpts := append(defaultDeveloperRegistrationRESTClientOptions(), opts...)
307 httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...)
308 if err != nil {
309 return nil, err
310 }
311
312 callOpts := defaultDeveloperRegistrationRESTCallOptions()
313 c := &developerRegistrationRESTClient{
314 endpoint: endpoint,
315 httpClient: httpClient,
316 CallOptions: &callOpts,
317 logger: internaloption.GetLogger(opts),
318 }
319 c.setGoogleClientInfo()
320
321 return &DeveloperRegistrationClient{internalClient: c, CallOptions: callOpts}, nil
322 }
323
324 func defaultDeveloperRegistrationRESTClientOptions() []option.ClientOption {
325 return []option.ClientOption{
326 internaloption.WithDefaultEndpoint("https://merchantapi.googleapis.com"),
327 internaloption.WithDefaultEndpointTemplate("https://merchantapi.UNIVERSE_DOMAIN"),
328 internaloption.WithDefaultMTLSEndpoint("https://merchantapi.mtls.googleapis.com"),
329 internaloption.WithDefaultUniverseDomain("googleapis.com"),
330 internaloption.WithDefaultAudience("https://merchantapi.googleapis.com/"),
331 internaloption.WithDefaultScopes(DefaultAuthScopes()...),
332 internaloption.EnableNewAuthLibrary(),
333 }
334 }
335
336 // setGoogleClientInfo sets the name and version of the application in
337 // the `x-goog-api-client` header passed on each request. Intended for
338 // use by Google-written clients.
339 func (c *developerRegistrationRESTClient) setGoogleClientInfo(keyval ...string) {
340 kv := append([]string{"gl-go", gax.GoVersion}, keyval...)
341 kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion)
342 c.xGoogHeaders = []string{
343 "x-goog-api-client", gax.XGoogHeader(kv...),
344 }
345 }
346
347 // Close closes the connection to the API service. The user should invoke this when
348 // the client is no longer required.
349 func (c *developerRegistrationRESTClient) Close() error {
350 // Replace httpClient with nil to force cleanup.
351 c.httpClient = nil
352 return nil
353 }
354
355 // Connection returns a connection to the API service.
356 //
357 // Deprecated: This method always returns nil.
358 func (c *developerRegistrationRESTClient) Connection() *grpc.ClientConn {
359 return nil
360 }
361 func (c *developerRegistrationGRPCClient) RegisterGcp(ctx context.Context, req *accountspb.RegisterGcpRequest, opts ...gax.CallOption) (*accountspb.DeveloperRegistration, error) {
362 hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))}
363
364 hds = append(c.xGoogHeaders, hds...)
365 ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)
366 opts = append((*c.CallOptions).RegisterGcp[0:len((*c.CallOptions).RegisterGcp):len((*c.CallOptions).RegisterGcp)], opts...)
367 var resp *accountspb.DeveloperRegistration
368 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
369 var err error
370 resp, err = executeRPC(ctx, c.developerRegistrationClient.RegisterGcp, req, settings.GRPC, c.logger, "RegisterGcp")
371 return err
372 }, opts...)
373 if err != nil {
374 return nil, err
375 }
376 return resp, nil
377 }
378
379 func (c *developerRegistrationGRPCClient) GetDeveloperRegistration(ctx context.Context, req *accountspb.GetDeveloperRegistrationRequest, opts ...gax.CallOption) (*accountspb.DeveloperRegistration, error) {
380 hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))}
381
382 hds = append(c.xGoogHeaders, hds...)
383 ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)
384 opts = append((*c.CallOptions).GetDeveloperRegistration[0:len((*c.CallOptions).GetDeveloperRegistration):len((*c.CallOptions).GetDeveloperRegistration)], opts...)
385 var resp *accountspb.DeveloperRegistration
386 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
387 var err error
388 resp, err = executeRPC(ctx, c.developerRegistrationClient.GetDeveloperRegistration, req, settings.GRPC, c.logger, "GetDeveloperRegistration")
389 return err
390 }, opts...)
391 if err != nil {
392 return nil, err
393 }
394 return resp, nil
395 }
396
397 func (c *developerRegistrationGRPCClient) UnregisterGcp(ctx context.Context, req *accountspb.UnregisterGcpRequest, opts ...gax.CallOption) error {
398 hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))}
399
400 hds = append(c.xGoogHeaders, hds...)
401 ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...)
402 opts = append((*c.CallOptions).UnregisterGcp[0:len((*c.CallOptions).UnregisterGcp):len((*c.CallOptions).UnregisterGcp)], opts...)
403 err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
404 var err error
405 _, err = executeRPC(ctx, c.developerRegistrationClient.UnregisterGcp, req, settings.GRPC, c.logger, "UnregisterGcp")
406 return err
407 }, opts...)
408 return err
409 }
410
411 // RegisterGcp registers the GCP used for the API call to the shopping account passed in
412 // the request. Will create a user with an “API developer” and add the
413 // “developer_email” as a contact with “API notifications” email preference
414 // on.
415 func (c *developerRegistrationRESTClient) RegisterGcp(ctx context.Context, req *accountspb.RegisterGcpRequest, opts ...gax.CallOption) (*accountspb.DeveloperRegistration, error) {
416 m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}
417 jsonReq, err := m.Marshal(req)
418 if err != nil {
419 return nil, err
420 }
421
422 baseUrl, err := url.Parse(c.endpoint)
423 if err != nil {
424 return nil, err
425 }
426 baseUrl.Path += fmt.Sprintf("/accounts/v1/%v:registerGcp", req.GetName())
427
428 params := url.Values{}
429 params.Add("$alt", "json;enum-encoding=int")
430
431 baseUrl.RawQuery = params.Encode()
432
433 // Build HTTP headers from client and context metadata.
434 hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))}
435
436 hds = append(c.xGoogHeaders, hds...)
437 hds = append(hds, "Content-Type", "application/json")
438 headers := gax.BuildHeaders(ctx, hds...)
439 opts = append((*c.CallOptions).RegisterGcp[0:len((*c.CallOptions).RegisterGcp):len((*c.CallOptions).RegisterGcp)], opts...)
440 unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
441 resp := &accountspb.DeveloperRegistration{}
442 e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
443 if settings.Path != "" {
444 baseUrl.Path = settings.Path
445 }
446 httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq))
447 if err != nil {
448 return err
449 }
450 httpReq = httpReq.WithContext(ctx)
451 httpReq.Header = headers
452
453 buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "RegisterGcp")
454 if err != nil {
455 return err
456 }
457
458 if err := unm.Unmarshal(buf, resp); err != nil {
459 return err
460 }
461
462 return nil
463 }, opts...)
464 if e != nil {
465 return nil, e
466 }
467 return resp, nil
468 }
469
470 // GetDeveloperRegistration retrieves a developer registration for a merchant.
471 func (c *developerRegistrationRESTClient) GetDeveloperRegistration(ctx context.Context, req *accountspb.GetDeveloperRegistrationRequest, opts ...gax.CallOption) (*accountspb.DeveloperRegistration, error) {
472 baseUrl, err := url.Parse(c.endpoint)
473 if err != nil {
474 return nil, err
475 }
476 baseUrl.Path += fmt.Sprintf("/accounts/v1/%v", req.GetName())
477
478 params := url.Values{}
479 params.Add("$alt", "json;enum-encoding=int")
480
481 baseUrl.RawQuery = params.Encode()
482
483 // Build HTTP headers from client and context metadata.
484 hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))}
485
486 hds = append(c.xGoogHeaders, hds...)
487 hds = append(hds, "Content-Type", "application/json")
488 headers := gax.BuildHeaders(ctx, hds...)
489 opts = append((*c.CallOptions).GetDeveloperRegistration[0:len((*c.CallOptions).GetDeveloperRegistration):len((*c.CallOptions).GetDeveloperRegistration)], opts...)
490 unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
491 resp := &accountspb.DeveloperRegistration{}
492 e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
493 if settings.Path != "" {
494 baseUrl.Path = settings.Path
495 }
496 httpReq, err := http.NewRequest("GET", baseUrl.String(), nil)
497 if err != nil {
498 return err
499 }
500 httpReq = httpReq.WithContext(ctx)
501 httpReq.Header = headers
502
503 buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetDeveloperRegistration")
504 if err != nil {
505 return err
506 }
507
508 if err := unm.Unmarshal(buf, resp); err != nil {
509 return err
510 }
511
512 return nil
513 }, opts...)
514 if e != nil {
515 return nil, e
516 }
517 return resp, nil
518 }
519
520 // UnregisterGcp unregister the calling GCP from the calling shopping account. Note that the
521 // GCP will still be able to access the API for at most 1 day from the
522 // unregister succussful call.
523 func (c *developerRegistrationRESTClient) UnregisterGcp(ctx context.Context, req *accountspb.UnregisterGcpRequest, opts ...gax.CallOption) error {
524 m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true}
525 jsonReq, err := m.Marshal(req)
526 if err != nil {
527 return err
528 }
529
530 baseUrl, err := url.Parse(c.endpoint)
531 if err != nil {
532 return err
533 }
534 baseUrl.Path += fmt.Sprintf("/accounts/v1/%v:unregisterGcp", req.GetName())
535
536 params := url.Values{}
537 params.Add("$alt", "json;enum-encoding=int")
538
539 baseUrl.RawQuery = params.Encode()
540
541 // Build HTTP headers from client and context metadata.
542 hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))}
543
544 hds = append(c.xGoogHeaders, hds...)
545 hds = append(hds, "Content-Type", "application/json")
546 headers := gax.BuildHeaders(ctx, hds...)
547 return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
548 if settings.Path != "" {
549 baseUrl.Path = settings.Path
550 }
551 httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq))
552 if err != nil {
553 return err
554 }
555 httpReq = httpReq.WithContext(ctx)
556 httpReq.Header = headers
557
558 _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "UnregisterGcp")
559 return err
560 }, opts...)
561 }