| 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 |
// [START financialservices_v1_generated_AML_CreateInstance_sync] |
| 18 |
|
| 19 |
package main |
| 20 |
|
| 21 |
import ( |
| 22 |
"context" |
| 23 |
|
| 24 |
financialservices "cloud.google.com/go/financialservices/apiv1" |
| 25 |
financialservicespb "cloud.google.com/go/financialservices/apiv1/financialservicespb" |
| 26 |
) |
| 27 |
|
| 28 |
func main() { |
| 29 |
ctx := context.Background() |
| 30 |
// This snippet has been automatically generated and should be regarded as a code template only. |
| 31 |
// It will require modifications to work: |
| 32 |
// - It may require correct/in-range values for request initialization. |
| 33 |
// - It may require specifying regional endpoints when creating the service client as shown in: |
| 34 |
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 35 |
c, err := financialservices.NewAMLClient(ctx) |
| 36 |
if err != nil { |
| 37 |
// TODO: Handle error. |
| 38 |
} |
| 39 |
defer c.Close() |
| 40 |
|
| 41 |
req := &financialservicespb.CreateInstanceRequest{ |
| 42 |
// TODO: Fill request struct fields. |
| 43 |
// See https://pkg.go.dev/cloud.google.com/go/financialservices/apiv1/financialservicespb#CreateInstanceRequest. |
| 44 |
} |
| 45 |
op, err := c.CreateInstance(ctx, req) |
| 46 |
if err != nil { |
| 47 |
// TODO: Handle error. |
| 48 |
} |
| 49 |
|
| 50 |
resp, err := op.Wait(ctx) |
| 51 |
if err != nil { |
| 52 |
// TODO: Handle error. |
| 53 |
} |
| 54 |
// TODO: Use resp. |
| 55 |
_ = resp |
| 56 |
} |
| 57 |
|
| 58 |
// [END financialservices_v1_generated_AML_CreateInstance_sync] |