| // Copyright 2022 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // https://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Code generated by protoc-gen-go_gapic. DO NOT EDIT. |
| |
| package gkemulticloud_test |
| |
| import ( |
| "context" |
| |
| gkemulticloud "cloud.google.com/go/gkemulticloud/apiv1" |
| "google.golang.org/api/iterator" |
| gkemulticloudpb "google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1" |
| ) |
| |
| func ExampleNewAzureClustersClient() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| // TODO: Use client. |
| _ = c |
| } |
| |
| func ExampleAzureClustersClient_CreateAzureClient() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.CreateAzureClientRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#CreateAzureClientRequest. |
| } |
| op, err := c.CreateAzureClient(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| resp, err := op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_GetAzureClient() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.GetAzureClientRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#GetAzureClientRequest. |
| } |
| resp, err := c.GetAzureClient(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_ListAzureClients() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.ListAzureClientsRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#ListAzureClientsRequest. |
| } |
| it := c.ListAzureClients(ctx, req) |
| for { |
| resp, err := it.Next() |
| if err == iterator.Done { |
| break |
| } |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| } |
| |
| func ExampleAzureClustersClient_DeleteAzureClient() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.DeleteAzureClientRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#DeleteAzureClientRequest. |
| } |
| op, err := c.DeleteAzureClient(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| err = op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| } |
| |
| func ExampleAzureClustersClient_CreateAzureCluster() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.CreateAzureClusterRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#CreateAzureClusterRequest. |
| } |
| op, err := c.CreateAzureCluster(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| resp, err := op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_UpdateAzureCluster() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.UpdateAzureClusterRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#UpdateAzureClusterRequest. |
| } |
| op, err := c.UpdateAzureCluster(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| resp, err := op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_GetAzureCluster() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.GetAzureClusterRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#GetAzureClusterRequest. |
| } |
| resp, err := c.GetAzureCluster(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_ListAzureClusters() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.ListAzureClustersRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#ListAzureClustersRequest. |
| } |
| it := c.ListAzureClusters(ctx, req) |
| for { |
| resp, err := it.Next() |
| if err == iterator.Done { |
| break |
| } |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| } |
| |
| func ExampleAzureClustersClient_DeleteAzureCluster() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.DeleteAzureClusterRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#DeleteAzureClusterRequest. |
| } |
| op, err := c.DeleteAzureCluster(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| err = op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| } |
| |
| func ExampleAzureClustersClient_GenerateAzureAccessToken() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.GenerateAzureAccessTokenRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#GenerateAzureAccessTokenRequest. |
| } |
| resp, err := c.GenerateAzureAccessToken(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_CreateAzureNodePool() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.CreateAzureNodePoolRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#CreateAzureNodePoolRequest. |
| } |
| op, err := c.CreateAzureNodePool(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| resp, err := op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_UpdateAzureNodePool() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.UpdateAzureNodePoolRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#UpdateAzureNodePoolRequest. |
| } |
| op, err := c.UpdateAzureNodePool(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| resp, err := op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_GetAzureNodePool() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.GetAzureNodePoolRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#GetAzureNodePoolRequest. |
| } |
| resp, err := c.GetAzureNodePool(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleAzureClustersClient_ListAzureNodePools() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.ListAzureNodePoolsRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#ListAzureNodePoolsRequest. |
| } |
| it := c.ListAzureNodePools(ctx, req) |
| for { |
| resp, err := it.Next() |
| if err == iterator.Done { |
| break |
| } |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| } |
| |
| func ExampleAzureClustersClient_DeleteAzureNodePool() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.DeleteAzureNodePoolRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#DeleteAzureNodePoolRequest. |
| } |
| op, err := c.DeleteAzureNodePool(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| err = op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| } |
| |
| func ExampleAzureClustersClient_GetAzureServerConfig() { |
| ctx := context.Background() |
| c, err := gkemulticloud.NewAzureClustersClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := &gkemulticloudpb.GetAzureServerConfigRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/gkemulticloud/v1#GetAzureServerConfigRequest. |
| } |
| resp, err := c.GetAzureServerConfig(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |