| 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 gkehub is an auto-generated package for the |
| 18 | // GKE Hub API. |
| 19 | // |
| 20 | // NOTE: This package is in beta. It is not stable, and may be subject to changes. |
| 21 | // |
| 22 | // # General documentation |
| 23 | // |
| 24 | // For information that is relevant for all client libraries please reference |
| 25 | // https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this |
| 26 | // page includes: |
| 27 | // |
| 28 | // - [Authentication and Authorization] |
| 29 | // - [Timeouts and Cancellation] |
| 30 | // - [Testing against Client Libraries] |
| 31 | // - [Debugging Client Libraries] |
| 32 | // - [Inspecting errors] |
| 33 | // |
| 34 | // # Example usage |
| 35 | // |
| 36 | // To get started with this package, create a client. |
| 37 | // |
| 38 | // // go get cloud.google.com/go/gkehub/apiv1beta1@latest |
| 39 | // ctx := context.Background() |
| 40 | // // This snippet has been automatically generated and should be regarded as a code template only. |
| 41 | // // It will require modifications to work: |
| 42 | // // - It may require correct/in-range values for request initialization. |
| 43 | // // - It may require specifying regional endpoints when creating the service client as shown in: |
| 44 | // // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 45 | // c, err := gkehub.NewGkeHubMembershipClient(ctx) |
| 46 | // if err != nil { |
| 47 | // // TODO: Handle error. |
| 48 | // } |
| 49 | // defer c.Close() |
| 50 | // |
| 51 | // The client will use your default application credentials. Clients should be reused instead of created as needed. |
| 52 | // The methods of Client are safe for concurrent use by multiple goroutines. |
| 53 | // The returned client must be Closed when it is done being used. |
| 54 | // |
| 55 | // # Using the Client |
| 56 | // |
| 57 | // The following is an example of making an API call with the newly created client, mentioned above. |
| 58 | // |
| 59 | // req := &gkehubpb.CreateMembershipRequest{ |
| 60 | // // TODO: Fill request struct fields. |
| 61 | // // See https://pkg.go.dev/cloud.google.com/go/gkehub/apiv1beta1/gkehubpb#CreateMembershipRequest. |
| 62 | // } |
| 63 | // op, err := c.CreateMembership(ctx, req) |
| 64 | // if err != nil { |
| 65 | // // TODO: Handle error. |
| 66 | // } |
| 67 | // |
| 68 | // resp, err := op.Wait(ctx) |
| 69 | // if err != nil { |
| 70 | // // TODO: Handle error. |
| 71 | // } |
| 72 | // // TODO: Use resp. |
| 73 | // _ = resp |
| 74 | // |
| 75 | // # Use of Context |
| 76 | // |
| 77 | // The ctx passed to NewGkeHubMembershipClient is used for authentication requests and |
| 78 | // for creating the underlying connection, but is not used for subsequent calls. |
| 79 | // Individual methods on the client use the ctx given to them. |
| 80 | // |
| 81 | // To close the open connection, use the Close() method. |
| 82 | // |
| 83 | // [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization |
| 84 | // [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation |
| 85 | // [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing |
| 86 | // [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging |
| 87 | // [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors |
| 88 | package gkehub // import "cloud.google.com/go/gkehub/apiv1beta1" |