1// Copyright 2021 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 17package appengine_test 18 19import ( 20 "context" 21 22 appengine "cloud.google.com/go/appengine/apiv1" 23 appenginepb "google.golang.org/genproto/googleapis/appengine/v1" 24) 25 26func ExampleNewApplicationsClient() { 27 ctx := context.Background() 28 c, err := appengine.NewApplicationsClient(ctx) 29 if err != nil { 30 // TODO: Handle error. 31 } 32 defer c.Close() 33 34 // TODO: Use client. 35 _ = c 36} 37 38func ExampleApplicationsClient_GetApplication() { 39 ctx := context.Background() 40 c, err := appengine.NewApplicationsClient(ctx) 41 if err != nil { 42 // TODO: Handle error. 43 } 44 defer c.Close() 45 46 req := &appenginepb.GetApplicationRequest{ 47 // TODO: Fill request struct fields. 48 // See https://pkg.go.dev/google.golang.org/genproto/googleapis/appengine/v1#GetApplicationRequest. 49 } 50 resp, err := c.GetApplication(ctx, req) 51 if err != nil { 52 // TODO: Handle error. 53 } 54 // TODO: Use resp. 55 _ = resp 56} 57 58func ExampleApplicationsClient_CreateApplication() { 59 ctx := context.Background() 60 c, err := appengine.NewApplicationsClient(ctx) 61 if err != nil { 62 // TODO: Handle error. 63 } 64 defer c.Close() 65 66 req := &appenginepb.CreateApplicationRequest{ 67 // TODO: Fill request struct fields. 68 // See https://pkg.go.dev/google.golang.org/genproto/googleapis/appengine/v1#CreateApplicationRequest. 69 } 70 op, err := c.CreateApplication(ctx, req) 71 if err != nil { 72 // TODO: Handle error. 73 } 74 75 resp, err := op.Wait(ctx) 76 if err != nil { 77 // TODO: Handle error. 78 } 79 // TODO: Use resp. 80 _ = resp 81} 82 83func ExampleApplicationsClient_UpdateApplication() { 84 ctx := context.Background() 85 c, err := appengine.NewApplicationsClient(ctx) 86 if err != nil { 87 // TODO: Handle error. 88 } 89 defer c.Close() 90 91 req := &appenginepb.UpdateApplicationRequest{ 92 // TODO: Fill request struct fields. 93 // See https://pkg.go.dev/google.golang.org/genproto/googleapis/appengine/v1#UpdateApplicationRequest. 94 } 95 op, err := c.UpdateApplication(ctx, req) 96 if err != nil { 97 // TODO: Handle error. 98 } 99 100 resp, err := op.Wait(ctx) 101 if err != nil { 102 // TODO: Handle error. 103 } 104 // TODO: Use resp. 105 _ = resp 106} 107 108func ExampleApplicationsClient_RepairApplication() { 109 ctx := context.Background() 110 c, err := appengine.NewApplicationsClient(ctx) 111 if err != nil { 112 // TODO: Handle error. 113 } 114 defer c.Close() 115 116 req := &appenginepb.RepairApplicationRequest{ 117 // TODO: Fill request struct fields. 118 // See https://pkg.go.dev/google.golang.org/genproto/googleapis/appengine/v1#RepairApplicationRequest. 119 } 120 op, err := c.RepairApplication(ctx, req) 121 if err != nil { 122 // TODO: Handle error. 123 } 124 125 resp, err := op.Wait(ctx) 126 if err != nil { 127 // TODO: Handle error. 128 } 129 // TODO: Use resp. 130 _ = resp 131} 132