| 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 issueresolution_test |
| 18 | |
| 19 | import ( |
| 20 | "context" |
| 21 | |
| 22 | issueresolution "cloud.google.com/go/shopping/merchant/issueresolution/apiv1" |
| 23 | issueresolutionpb "cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb" |
| 24 | ) |
| 25 | |
| 26 | func ExampleNewClient() { |
| 27 | ctx := context.Background() |
| 28 | // This snippet has been automatically generated and should be regarded as a code template only. |
| 29 | // It will require modifications to work: |
| 30 | // - It may require correct/in-range values for request initialization. |
| 31 | // - It may require specifying regional endpoints when creating the service client as shown in: |
| 32 | // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 33 | c, err := issueresolution.NewClient(ctx) |
| 34 | if err != nil { |
| 35 | // TODO: Handle error. |
| 36 | } |
| 37 | defer c.Close() |
| 38 | |
| 39 | // TODO: Use client. |
| 40 | _ = c |
| 41 | } |
| 42 | |
| 43 | func ExampleNewRESTClient() { |
| 44 | ctx := context.Background() |
| 45 | // This snippet has been automatically generated and should be regarded as a code template only. |
| 46 | // It will require modifications to work: |
| 47 | // - It may require correct/in-range values for request initialization. |
| 48 | // - It may require specifying regional endpoints when creating the service client as shown in: |
| 49 | // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 50 | c, err := issueresolution.NewRESTClient(ctx) |
| 51 | if err != nil { |
| 52 | // TODO: Handle error. |
| 53 | } |
| 54 | defer c.Close() |
| 55 | |
| 56 | // TODO: Use client. |
| 57 | _ = c |
| 58 | } |
| 59 | |
| 60 | func ExampleClient_RenderAccountIssues() { |
| 61 | ctx := context.Background() |
| 62 | // This snippet has been automatically generated and should be regarded as a code template only. |
| 63 | // It will require modifications to work: |
| 64 | // - It may require correct/in-range values for request initialization. |
| 65 | // - It may require specifying regional endpoints when creating the service client as shown in: |
| 66 | // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 67 | c, err := issueresolution.NewClient(ctx) |
| 68 | if err != nil { |
| 69 | // TODO: Handle error. |
| 70 | } |
| 71 | defer c.Close() |
| 72 | |
| 73 | req := &issueresolutionpb.RenderAccountIssuesRequest{ |
| 74 | // TODO: Fill request struct fields. |
| 75 | // See https://pkg.go.dev/cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb#RenderAccountIssuesRequest. |
| 76 | } |
| 77 | resp, err := c.RenderAccountIssues(ctx, req) |
| 78 | if err != nil { |
| 79 | // TODO: Handle error. |
| 80 | } |
| 81 | // TODO: Use resp. |
| 82 | _ = resp |
| 83 | } |
| 84 | |
| 85 | func ExampleClient_RenderProductIssues() { |
| 86 | ctx := context.Background() |
| 87 | // This snippet has been automatically generated and should be regarded as a code template only. |
| 88 | // It will require modifications to work: |
| 89 | // - It may require correct/in-range values for request initialization. |
| 90 | // - It may require specifying regional endpoints when creating the service client as shown in: |
| 91 | // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 92 | c, err := issueresolution.NewClient(ctx) |
| 93 | if err != nil { |
| 94 | // TODO: Handle error. |
| 95 | } |
| 96 | defer c.Close() |
| 97 | |
| 98 | req := &issueresolutionpb.RenderProductIssuesRequest{ |
| 99 | // TODO: Fill request struct fields. |
| 100 | // See https://pkg.go.dev/cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb#RenderProductIssuesRequest. |
| 101 | } |
| 102 | resp, err := c.RenderProductIssues(ctx, req) |
| 103 | if err != nil { |
| 104 | // TODO: Handle error. |
| 105 | } |
| 106 | // TODO: Use resp. |
| 107 | _ = resp |
| 108 | } |
| 109 | |
| 110 | func ExampleClient_TriggerAction() { |
| 111 | ctx := context.Background() |
| 112 | // This snippet has been automatically generated and should be regarded as a code template only. |
| 113 | // It will require modifications to work: |
| 114 | // - It may require correct/in-range values for request initialization. |
| 115 | // - It may require specifying regional endpoints when creating the service client as shown in: |
| 116 | // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options |
| 117 | c, err := issueresolution.NewClient(ctx) |
| 118 | if err != nil { |
| 119 | // TODO: Handle error. |
| 120 | } |
| 121 | defer c.Close() |
| 122 | |
| 123 | req := &issueresolutionpb.TriggerActionRequest{ |
| 124 | // TODO: Fill request struct fields. |
| 125 | // See https://pkg.go.dev/cloud.google.com/go/shopping/merchant/issueresolution/apiv1/issueresolutionpb#TriggerActionRequest. |
| 126 | } |
| 127 | resp, err := c.TriggerAction(ctx, req) |
| 128 | if err != nil { |
| 129 | // TODO: Handle error. |
| 130 | } |
| 131 | // TODO: Use resp. |
| 132 | _ = resp |
| 133 | } |