1// Copyright 2019 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 gapic-generator. DO NOT EDIT. 16 17package debugger_test 18 19import ( 20 "context" 21 22 debugger "cloud.google.com/go/debugger/apiv2" 23 clouddebuggerpb "google.golang.org/genproto/googleapis/devtools/clouddebugger/v2" 24) 25 26func ExampleNewDebugger2Client() { 27 ctx := context.Background() 28 c, err := debugger.NewDebugger2Client(ctx) 29 if err != nil { 30 // TODO: Handle error. 31 } 32 // TODO: Use client. 33 _ = c 34} 35 36func ExampleDebugger2Client_SetBreakpoint() { 37 ctx := context.Background() 38 c, err := debugger.NewDebugger2Client(ctx) 39 if err != nil { 40 // TODO: Handle error. 41 } 42 43 req := &clouddebuggerpb.SetBreakpointRequest{ 44 // TODO: Fill request struct fields. 45 } 46 resp, err := c.SetBreakpoint(ctx, req) 47 if err != nil { 48 // TODO: Handle error. 49 } 50 // TODO: Use resp. 51 _ = resp 52} 53 54func ExampleDebugger2Client_GetBreakpoint() { 55 ctx := context.Background() 56 c, err := debugger.NewDebugger2Client(ctx) 57 if err != nil { 58 // TODO: Handle error. 59 } 60 61 req := &clouddebuggerpb.GetBreakpointRequest{ 62 // TODO: Fill request struct fields. 63 } 64 resp, err := c.GetBreakpoint(ctx, req) 65 if err != nil { 66 // TODO: Handle error. 67 } 68 // TODO: Use resp. 69 _ = resp 70} 71 72func ExampleDebugger2Client_DeleteBreakpoint() { 73 ctx := context.Background() 74 c, err := debugger.NewDebugger2Client(ctx) 75 if err != nil { 76 // TODO: Handle error. 77 } 78 79 req := &clouddebuggerpb.DeleteBreakpointRequest{ 80 // TODO: Fill request struct fields. 81 } 82 err = c.DeleteBreakpoint(ctx, req) 83 if err != nil { 84 // TODO: Handle error. 85 } 86} 87 88func ExampleDebugger2Client_ListBreakpoints() { 89 ctx := context.Background() 90 c, err := debugger.NewDebugger2Client(ctx) 91 if err != nil { 92 // TODO: Handle error. 93 } 94 95 req := &clouddebuggerpb.ListBreakpointsRequest{ 96 // TODO: Fill request struct fields. 97 } 98 resp, err := c.ListBreakpoints(ctx, req) 99 if err != nil { 100 // TODO: Handle error. 101 } 102 // TODO: Use resp. 103 _ = resp 104} 105 106func ExampleDebugger2Client_ListDebuggees() { 107 ctx := context.Background() 108 c, err := debugger.NewDebugger2Client(ctx) 109 if err != nil { 110 // TODO: Handle error. 111 } 112 113 req := &clouddebuggerpb.ListDebuggeesRequest{ 114 // TODO: Fill request struct fields. 115 } 116 resp, err := c.ListDebuggees(ctx, req) 117 if err != nil { 118 // TODO: Handle error. 119 } 120 // TODO: Use resp. 121 _ = resp 122} 123