diff --git a/bigquery/go.mod b/bigquery/go.mod index 316f036f8f41..2127119efe4c 100644 --- a/bigquery/go.mod +++ b/bigquery/go.mod @@ -13,8 +13,8 @@ require ( go.opencensus.io v0.23.0 golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f - google.golang.org/api v0.86.0 - google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 + google.golang.org/api v0.87.0 + google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/bigquery/go.sum b/bigquery/go.sum index 8f6b47c5e161..640755dc763b 100644 --- a/bigquery/go.sum +++ b/bigquery/go.sum @@ -514,8 +514,8 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.86.0 h1:ZAnyOHQFIuWso1BodVfSaRyffD74T9ERGFa3k1fNk/U= -google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.87.0 h1:pUQVF/F+X7Tl1lo4LJoJf5BOpjtmINU80p9XpYTU2p4= +google.golang.org/api v0.87.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -604,8 +604,8 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03 h1:W70HjnmXFJm+8RNjOpIDYW2nKsSi/af0VvIZUtYkwuU= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 h1:zfXhTgBfGlIh3jMXN06W8qbhFGsh6MJNJiYEuhTddOI= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/bigtable/go.sum b/bigtable/go.sum index 506b7da58fb2..ff3d8915bd0e 100644 --- a/bigtable/go.sum +++ b/bigtable/go.sum @@ -617,7 +617,6 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220708155623-50e5f4832e73 h1:sdZWfcGN37Dv0QWIhuasQGMzAQJOL2oqnvot4/kPgfQ= google.golang.org/genproto v0.0.0-20220708155623-50e5f4832e73/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= diff --git a/functions/go.mod b/functions/go.mod index 6125e63ad7fc..b7a64a66ba36 100644 --- a/functions/go.mod +++ b/functions/go.mod @@ -7,7 +7,7 @@ require ( github.com/google/go-cmp v0.5.8 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.85.0 - google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad + google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/functions/go.sum b/functions/go.sum index f00d995cec43..29ab55b7c5e3 100644 --- a/functions/go.sum +++ b/functions/go.sum @@ -585,8 +585,9 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 h1:zfXhTgBfGlIh3jMXN06W8qbhFGsh6MJNJiYEuhTddOI= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/go.mod b/go.mod index 2e78dc602ff4..39564a660717 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( go.opencensus.io v0.23.0 golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2 golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f - google.golang.org/api v0.86.0 - google.golang.org/genproto v0.0.0-20220712132514-bdd2acd4974d + google.golang.org/api v0.87.0 + google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/go.sum b/go.sum index e4e17e22b2c7..4a6518132f3d 100644 --- a/go.sum +++ b/go.sum @@ -510,8 +510,8 @@ google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6r google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.86.0 h1:ZAnyOHQFIuWso1BodVfSaRyffD74T9ERGFa3k1fNk/U= -google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.87.0 h1:pUQVF/F+X7Tl1lo4LJoJf5BOpjtmINU80p9XpYTU2p4= +google.golang.org/api v0.87.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -600,8 +600,8 @@ google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220712132514-bdd2acd4974d h1:YbuF5+kdiC516xIP60RvlHeFbY9sRDR73QsAGHpkeVw= -google.golang.org/genproto v0.0.0-20220712132514-bdd2acd4974d/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 h1:zfXhTgBfGlIh3jMXN06W8qbhFGsh6MJNJiYEuhTddOI= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/internal/generated/snippets/assuredworkloads/apiv1/snippet_metadata.google.cloud.assuredworkloads.v1.json b/internal/generated/snippets/assuredworkloads/apiv1/snippet_metadata.google.cloud.assuredworkloads.v1.json index d000b2691174..4c34db9718aa 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1/snippet_metadata.google.cloud.assuredworkloads.v1.json +++ b/internal/generated/snippets/assuredworkloads/apiv1/snippet_metadata.google.cloud.assuredworkloads.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/assuredworkloads/apiv1", - "version": "1.0.0", + "version": "1.1.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json b/internal/generated/snippets/assuredworkloads/apiv1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json index f9d3e434944b..e48c171f6d8b 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json +++ b/internal/generated/snippets/assuredworkloads/apiv1beta1/snippet_metadata.google.cloud.assuredworkloads.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/assuredworkloads/apiv1beta1", - "version": "1.0.0", + "version": "1.1.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/CancelOperation/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/CancelOperation/main.go new file mode 100644 index 000000000000..a44a3896e2f2 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/CancelOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_CancelOperation_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_CancelOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/CreateAppConnection/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/CreateAppConnection/main.go new file mode 100644 index 000000000000..77e594fa6d44 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/CreateAppConnection/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.CreateAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#CreateAppConnectionRequest. + } + op, err := c.CreateAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/DeleteAppConnection/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/DeleteAppConnection/main.go new file mode 100644 index 000000000000..51702eb7211c --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/DeleteAppConnection/main.go @@ -0,0 +1,51 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.DeleteAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#DeleteAppConnectionRequest. + } + op, err := c.DeleteAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/DeleteOperation/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/DeleteOperation/main.go new file mode 100644 index 000000000000..96c48c4c6831 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/DeleteOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_DeleteOperation_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_DeleteOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetAppConnection/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetAppConnection/main.go new file mode 100644 index 000000000000..f41ddc538559 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetAppConnection/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.GetAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#GetAppConnectionRequest. + } + resp, err := c.GetAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetIamPolicy/main.go new file mode 100644 index 000000000000..0f009701f9bd --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_GetIamPolicy_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetLocation/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetLocation/main.go new file mode 100644 index 000000000000..8ec340090c5a --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetLocation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_GetLocation_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_GetLocation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..aeb2264f5b1a --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/GetOperation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_GetOperation_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_GetOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListAppConnections/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListAppConnections/main.go new file mode 100644 index 000000000000..8039547679ef --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListAppConnections/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + "google.golang.org/api/iterator" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.ListAppConnectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#ListAppConnectionsRequest. + } + it := c.ListAppConnections(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListLocations/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListLocations/main.go new file mode 100644 index 000000000000..40563414574e --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListLocations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_ListLocations_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_ListLocations_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListOperations/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListOperations/main.go new file mode 100644 index 000000000000..ea7c7cf9788a --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ListOperations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_ListOperations_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_ListOperations_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ResolveAppConnections/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ResolveAppConnections/main.go new file mode 100644 index 000000000000..adca14d3cfdd --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/ResolveAppConnections/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + "google.golang.org/api/iterator" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.ResolveAppConnectionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#ResolveAppConnectionsRequest. + } + it := c.ResolveAppConnections(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/SetIamPolicy/main.go new file mode 100644 index 000000000000..929a0e4c1c83 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_SetIamPolicy_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/TestIamPermissions/main.go new file mode 100644 index 000000000000..3d0a44774036 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_TestIamPermissions_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/UpdateAppConnection/main.go b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/UpdateAppConnection/main.go new file mode 100644 index 000000000000..14fddf9d79cd --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/Client/UpdateAppConnection/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] + +package main + +import ( + "context" + + appconnections "cloud.google.com/go/beyondcorp/appconnections/apiv1" + appconnectionspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnections.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectionspb.UpdateAppConnectionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnections/v1#UpdateAppConnectionRequest. + } + op, err := c.UpdateAppConnection(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnections/apiv1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json b/internal/generated/snippets/beyondcorp/appconnections/apiv1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json new file mode 100644 index 000000000000..6793f190c14b --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnections/apiv1/snippet_metadata.google.cloud.beyondcorp.appconnections.v1.json @@ -0,0 +1,703 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/beyondcorp/appconnections/apiv1", + "version": "0.1.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnections.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_CancelOperation_sync", + "title": "beyondcorp CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CancelOperation", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_CreateAppConnection_sync", + "title": "beyondcorp CreateAppConnection Sample", + "description": "CreateAppConnection creates a new AppConnection in a given project and location.", + "file": "Client/CreateAppConnection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.CreateAppConnection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectionspb.CreateAppConnectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateAppConnectionOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "CreateAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.CreateAppConnection", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_DeleteAppConnection_sync", + "title": "beyondcorp DeleteAppConnection Sample", + "description": "DeleteAppConnection deletes a single AppConnection.", + "file": "Client/DeleteAppConnection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.DeleteAppConnection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectionspb.DeleteAppConnectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteAppConnectionOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "DeleteAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteAppConnection", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_DeleteOperation_sync", + "title": "beyondcorp DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "Client/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.DeleteOperation", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_GetAppConnection_sync", + "title": "beyondcorp GetAppConnection Sample", + "description": "GetAppConnection gets details of a single AppConnection.", + "file": "Client/GetAppConnection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.GetAppConnection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectionspb.GetAppConnectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "appconnectionspb.AppConnection", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "GetAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetAppConnection", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_GetIamPolicy_sync", + "title": "beyondcorp GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "Client/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetIamPolicy", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_GetLocation_sync", + "title": "beyondcorp GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "Client/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "locationpb.Location", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetLocation", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_GetOperation_sync", + "title": "beyondcorp GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.GetOperation", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ListAppConnections_sync", + "title": "beyondcorp ListAppConnections Sample", + "description": "ListAppConnections lists AppConnections in a given project and location.", + "file": "Client/ListAppConnections/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListAppConnections", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.ListAppConnections", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectionspb.ListAppConnectionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "AppConnectionIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "ListAppConnections", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListAppConnections", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ListLocations_sync", + "title": "beyondcorp ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "Client/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListLocations", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ListOperations_sync", + "title": "beyondcorp ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ListOperations", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_ResolveAppConnections_sync", + "title": "beyondcorp ResolveAppConnections Sample", + "description": "ResolveAppConnections resolves AppConnections details for a given AppConnector.\nAn internal method called by a connector to find AppConnections to connect\nto.", + "file": "Client/ResolveAppConnections/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ResolveAppConnections", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.ResolveAppConnections", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectionspb.ResolveAppConnectionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ResolveAppConnectionsResponse_AppConnectionDetailsIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "ResolveAppConnections", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.ResolveAppConnections", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_SetIamPolicy_sync", + "title": "beyondcorp SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", + "file": "Client/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.SetIamPolicy", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_TestIamPermissions_sync", + "title": "beyondcorp TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", + "file": "Client/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.TestIamPermissionsResponse", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.TestIamPermissions", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectionsService_UpdateAppConnection_sync", + "title": "beyondcorp UpdateAppConnection Sample", + "description": "UpdateAppConnection updates the parameters of a single AppConnection.", + "file": "Client/UpdateAppConnection/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client.UpdateAppConnection", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectionspb.UpdateAppConnectionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpdateAppConnectionOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnections.v1.Client" + }, + "method": { + "shortName": "UpdateAppConnection", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService.UpdateAppConnection", + "service": { + "shortName": "AppConnectionsService", + "fullName": "google.cloud.beyondcorp.appconnections.v1.AppConnectionsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/CancelOperation/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/CancelOperation/main.go new file mode 100644 index 000000000000..816d81036dcc --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/CancelOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_CancelOperation_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppConnectorsService_CancelOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/CreateAppConnector/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/CreateAppConnector/main.go new file mode 100644 index 000000000000..d47803b0c4b1 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/CreateAppConnector/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.CreateAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#CreateAppConnectorRequest. + } + op, err := c.CreateAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/DeleteAppConnector/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/DeleteAppConnector/main.go new file mode 100644 index 000000000000..e8a878770dee --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/DeleteAppConnector/main.go @@ -0,0 +1,51 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.DeleteAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#DeleteAppConnectorRequest. + } + op, err := c.DeleteAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/DeleteOperation/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/DeleteOperation/main.go new file mode 100644 index 000000000000..1126a692cff2 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/DeleteOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_DeleteOperation_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppConnectorsService_DeleteOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetAppConnector/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetAppConnector/main.go new file mode 100644 index 000000000000..45113e1867d7 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetAppConnector/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.GetAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#GetAppConnectorRequest. + } + resp, err := c.GetAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetIamPolicy/main.go new file mode 100644 index 000000000000..b7115adcaac4 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_GetIamPolicy_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetLocation/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetLocation/main.go new file mode 100644 index 000000000000..23280ccb7995 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetLocation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_GetLocation_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_GetLocation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..d81225de6bd4 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/GetOperation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_GetOperation_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_GetOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListAppConnectors/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListAppConnectors/main.go new file mode 100644 index 000000000000..63b65525e20f --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListAppConnectors/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + "google.golang.org/api/iterator" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.ListAppConnectorsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#ListAppConnectorsRequest. + } + it := c.ListAppConnectors(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListLocations/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListLocations/main.go new file mode 100644 index 000000000000..c28a5f97d6d9 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListLocations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_ListLocations_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectorsService_ListLocations_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListOperations/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListOperations/main.go new file mode 100644 index 000000000000..da50ccb38bce --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ListOperations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_ListOperations_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppConnectorsService_ListOperations_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ReportStatus/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ReportStatus/main.go new file mode 100644 index 000000000000..ac18d24f877f --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/ReportStatus/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.ReportStatusRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#ReportStatusRequest. + } + op, err := c.ReportStatus(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/SetIamPolicy/main.go new file mode 100644 index 000000000000..a14a06bef7c0 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_SetIamPolicy_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/TestIamPermissions/main.go new file mode 100644 index 000000000000..b4787f02f70d --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_TestIamPermissions_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/UpdateAppConnector/main.go b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/UpdateAppConnector/main.go new file mode 100644 index 000000000000..e66f44553c5d --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/Client/UpdateAppConnector/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] + +package main + +import ( + "context" + + appconnectors "cloud.google.com/go/beyondcorp/appconnectors/apiv1" + appconnectorspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1" +) + +func main() { + ctx := context.Background() + c, err := appconnectors.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appconnectorspb.UpdateAppConnectorRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appconnectors/v1#UpdateAppConnectorRequest. + } + op, err := c.UpdateAppConnector(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync] diff --git a/internal/generated/snippets/beyondcorp/appconnectors/apiv1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json new file mode 100644 index 000000000000..0976df9dab60 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appconnectors/apiv1/snippet_metadata.google.cloud.beyondcorp.appconnectors.v1.json @@ -0,0 +1,703 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/beyondcorp/appconnectors/apiv1", + "version": "0.1.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.beyondcorp.appconnectors.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_CancelOperation_sync", + "title": "beyondcorp CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CancelOperation", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_CreateAppConnector_sync", + "title": "beyondcorp CreateAppConnector Sample", + "description": "CreateAppConnector creates a new AppConnector in a given project and location.", + "file": "Client/CreateAppConnector/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.CreateAppConnector", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectorspb.CreateAppConnectorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateAppConnectorOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "CreateAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.CreateAppConnector", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_DeleteAppConnector_sync", + "title": "beyondcorp DeleteAppConnector Sample", + "description": "DeleteAppConnector deletes a single AppConnector.", + "file": "Client/DeleteAppConnector/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.DeleteAppConnector", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectorspb.DeleteAppConnectorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteAppConnectorOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "DeleteAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteAppConnector", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_DeleteOperation_sync", + "title": "beyondcorp DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "Client/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.DeleteOperation", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_GetAppConnector_sync", + "title": "beyondcorp GetAppConnector Sample", + "description": "GetAppConnector gets details of a single AppConnector.", + "file": "Client/GetAppConnector/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.GetAppConnector", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectorspb.GetAppConnectorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "appconnectorspb.AppConnector", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "GetAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetAppConnector", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_GetIamPolicy_sync", + "title": "beyondcorp GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "Client/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetIamPolicy", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_GetLocation_sync", + "title": "beyondcorp GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "Client/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "locationpb.Location", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetLocation", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_GetOperation_sync", + "title": "beyondcorp GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.GetOperation", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ListAppConnectors_sync", + "title": "beyondcorp ListAppConnectors Sample", + "description": "ListAppConnectors lists AppConnectors in a given project and location.", + "file": "Client/ListAppConnectors/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListAppConnectors", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.ListAppConnectors", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectorspb.ListAppConnectorsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "AppConnectorIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "ListAppConnectors", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListAppConnectors", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ListLocations_sync", + "title": "beyondcorp ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "Client/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListLocations", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ListOperations_sync", + "title": "beyondcorp ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ListOperations", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_ReportStatus_sync", + "title": "beyondcorp ReportStatus Sample", + "description": "ReportStatus report status for a given connector.", + "file": "Client/ReportStatus/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ReportStatus", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.ReportStatus", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectorspb.ReportStatusRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ReportStatusOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "ReportStatus", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.ReportStatus", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_SetIamPolicy_sync", + "title": "beyondcorp SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", + "file": "Client/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.SetIamPolicy", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_TestIamPermissions_sync", + "title": "beyondcorp TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", + "file": "Client/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.TestIamPermissionsResponse", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.TestIamPermissions", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppConnectorsService_UpdateAppConnector_sync", + "title": "beyondcorp UpdateAppConnector Sample", + "description": "UpdateAppConnector updates the parameters of a single AppConnector.", + "file": "Client/UpdateAppConnector/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client.UpdateAppConnector", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appconnectorspb.UpdateAppConnectorRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpdateAppConnectorOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.Client" + }, + "method": { + "shortName": "UpdateAppConnector", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService.UpdateAppConnector", + "service": { + "shortName": "AppConnectorsService", + "fullName": "google.cloud.beyondcorp.appconnectors.v1.AppConnectorsService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/CancelOperation/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/CancelOperation/main.go new file mode 100644 index 000000000000..bb832bf5c49c --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/CancelOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_CancelOperation_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppGatewaysService_CancelOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/CreateAppGateway/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/CreateAppGateway/main.go new file mode 100644 index 000000000000..24a74915ddbc --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/CreateAppGateway/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + appgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.CreateAppGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#CreateAppGatewayRequest. + } + op, err := c.CreateAppGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/DeleteAppGateway/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/DeleteAppGateway/main.go new file mode 100644 index 000000000000..1e26dd6d987e --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/DeleteAppGateway/main.go @@ -0,0 +1,51 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + appgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.DeleteAppGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#DeleteAppGatewayRequest. + } + op, err := c.DeleteAppGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/DeleteOperation/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/DeleteOperation/main.go new file mode 100644 index 000000000000..d19c55f7365e --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/DeleteOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_DeleteOperation_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_AppGatewaysService_DeleteOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetAppGateway/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetAppGateway/main.go new file mode 100644 index 000000000000..4638a5a6ec16 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetAppGateway/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + appgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.GetAppGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#GetAppGatewayRequest. + } + resp, err := c.GetAppGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetIamPolicy/main.go new file mode 100644 index 000000000000..3376a62c5d81 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_GetIamPolicy_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetLocation/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetLocation/main.go new file mode 100644 index 000000000000..89857b8ed38b --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetLocation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_GetLocation_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_GetLocation_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..1f139cbe9b93 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/GetOperation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_GetOperation_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_GetOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListAppGateways/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListAppGateways/main.go new file mode 100644 index 000000000000..871179d1b921 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListAppGateways/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + "google.golang.org/api/iterator" + appgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &appgatewayspb.ListAppGatewaysRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/appgateways/v1#ListAppGatewaysRequest. + } + it := c.ListAppGateways(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListLocations/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListLocations/main.go new file mode 100644 index 000000000000..44ef9714d30f --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListLocations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_ListLocations_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppGatewaysService_ListLocations_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListOperations/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListOperations/main.go new file mode 100644 index 000000000000..ef50e1610966 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/ListOperations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_ListOperations_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_AppGatewaysService_ListOperations_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/SetIamPolicy/main.go new file mode 100644 index 000000000000..4c06c0d07f53 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_SetIamPolicy_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/TestIamPermissions/main.go new file mode 100644 index 000000000000..0a0f0e8a892e --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/Client/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_AppGatewaysService_TestIamPermissions_sync] + +package main + +import ( + "context" + + appgateways "cloud.google.com/go/beyondcorp/appgateways/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := appgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_AppGatewaysService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/beyondcorp/appgateways/apiv1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json b/internal/generated/snippets/beyondcorp/appgateways/apiv1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json new file mode 100644 index 000000000000..2ec13e3ba087 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/appgateways/apiv1/snippet_metadata.google.cloud.beyondcorp.appgateways.v1.json @@ -0,0 +1,611 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/beyondcorp/appgateways/apiv1", + "version": "0.1.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.beyondcorp.appgateways.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_CancelOperation_sync", + "title": "beyondcorp CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CancelOperation", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_CreateAppGateway_sync", + "title": "beyondcorp CreateAppGateway Sample", + "description": "CreateAppGateway creates a new AppGateway in a given project and location.", + "file": "Client/CreateAppGateway/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateAppGateway", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.CreateAppGateway", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appgatewayspb.CreateAppGatewayRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateAppGatewayOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "CreateAppGateway", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.CreateAppGateway", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_DeleteAppGateway_sync", + "title": "beyondcorp DeleteAppGateway Sample", + "description": "DeleteAppGateway deletes a single AppGateway.", + "file": "Client/DeleteAppGateway/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteAppGateway", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.DeleteAppGateway", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appgatewayspb.DeleteAppGatewayRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteAppGatewayOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "DeleteAppGateway", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteAppGateway", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_DeleteOperation_sync", + "title": "beyondcorp DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "Client/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.DeleteOperation", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_GetAppGateway_sync", + "title": "beyondcorp GetAppGateway Sample", + "description": "GetAppGateway gets details of a single AppGateway.", + "file": "Client/GetAppGateway/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetAppGateway", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.GetAppGateway", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appgatewayspb.GetAppGatewayRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "appgatewayspb.AppGateway", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "GetAppGateway", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetAppGateway", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_GetIamPolicy_sync", + "title": "beyondcorp GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "Client/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetIamPolicy", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_GetLocation_sync", + "title": "beyondcorp GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "Client/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "locationpb.Location", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetLocation", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_GetOperation_sync", + "title": "beyondcorp GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.GetOperation", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_ListAppGateways_sync", + "title": "beyondcorp ListAppGateways Sample", + "description": "ListAppGateways lists AppGateways in a given project and location.", + "file": "Client/ListAppGateways/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListAppGateways", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.ListAppGateways", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "appgatewayspb.ListAppGatewaysRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "AppGatewayIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "ListAppGateways", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListAppGateways", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_ListLocations_sync", + "title": "beyondcorp ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "Client/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListLocations", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_ListOperations_sync", + "title": "beyondcorp ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.ListOperations", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_SetIamPolicy_sync", + "title": "beyondcorp SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", + "file": "Client/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.SetIamPolicy", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_AppGatewaysService_TestIamPermissions_sync", + "title": "beyondcorp TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", + "file": "Client/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.TestIamPermissionsResponse", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.appgateways.v1.Client" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService.TestIamPermissions", + "service": { + "shortName": "AppGatewaysService", + "fullName": "google.cloud.beyondcorp.appgateways.v1.AppGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/CancelOperation/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/CancelOperation/main.go new file mode 100644 index 000000000000..99ed72c37ca2 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/CancelOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_CancelOperation_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_CancelOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/CreateClientConnectorService/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/CreateClientConnectorService/main.go new file mode 100644 index 000000000000..e3a93b767c33 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/CreateClientConnectorService/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.CreateClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#CreateClientConnectorServiceRequest. + } + op, err := c.CreateClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/DeleteClientConnectorService/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/DeleteClientConnectorService/main.go new file mode 100644 index 000000000000..079d3eb19553 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/DeleteClientConnectorService/main.go @@ -0,0 +1,51 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.DeleteClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#DeleteClientConnectorServiceRequest. + } + op, err := c.DeleteClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/DeleteOperation/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/DeleteOperation/main.go new file mode 100644 index 000000000000..2fcc14c1e2a5 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/DeleteOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_DeleteOperation_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_DeleteOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetClientConnectorService/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetClientConnectorService/main.go new file mode 100644 index 000000000000..35b7db868c80 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetClientConnectorService/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.GetClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#GetClientConnectorServiceRequest. + } + resp, err := c.GetClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetIamPolicy/main.go new file mode 100644 index 000000000000..dfd2dfa3ad34 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_GetIamPolicy_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetLocation/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetLocation/main.go new file mode 100644 index 000000000000..18756f00a97c --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetLocation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_GetLocation_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_GetLocation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..209ad14c5c43 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/GetOperation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_GetOperation_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_GetOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListClientConnectorServices/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListClientConnectorServices/main.go new file mode 100644 index 000000000000..735a08f17291 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListClientConnectorServices/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + "google.golang.org/api/iterator" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.ListClientConnectorServicesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#ListClientConnectorServicesRequest. + } + it := c.ListClientConnectorServices(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListLocations/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListLocations/main.go new file mode 100644 index 000000000000..8790280f8120 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListLocations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_ListLocations_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_ListLocations_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListOperations/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListOperations/main.go new file mode 100644 index 000000000000..8dfd7b4bf7a7 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/ListOperations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_ListOperations_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_ListOperations_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/SetIamPolicy/main.go new file mode 100644 index 000000000000..c52790d53a6d --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_SetIamPolicy_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/TestIamPermissions/main.go new file mode 100644 index 000000000000..fc1b1e04c34d --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_TestIamPermissions_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/UpdateClientConnectorService/main.go b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/UpdateClientConnectorService/main.go new file mode 100644 index 000000000000..3493c7b7e202 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/Client/UpdateClientConnectorService/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync] + +package main + +import ( + "context" + + clientconnectorservices "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1" + clientconnectorservicespb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1" +) + +func main() { + ctx := context.Background() + c, err := clientconnectorservices.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientconnectorservicespb.UpdateClientConnectorServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientconnectorservices/v1#UpdateClientConnectorServiceRequest. + } + op, err := c.UpdateClientConnectorService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync] diff --git a/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json new file mode 100644 index 000000000000..58b6d3bfefd3 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientconnectorservices/apiv1/snippet_metadata.google.cloud.beyondcorp.clientconnectorservices.v1.json @@ -0,0 +1,657 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/beyondcorp/clientconnectorservices/apiv1", + "version": "0.1.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.beyondcorp.clientconnectorservices.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_CancelOperation_sync", + "title": "beyondcorp CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.CancelOperation", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_CreateClientConnectorService_sync", + "title": "beyondcorp CreateClientConnectorService Sample", + "description": "CreateClientConnectorService creates a new ClientConnectorService in a given project and location.", + "file": "Client/CreateClientConnectorService/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.CreateClientConnectorService", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientconnectorservicespb.CreateClientConnectorServiceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateClientConnectorServiceOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "CreateClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.CreateClientConnectorService", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_DeleteClientConnectorService_sync", + "title": "beyondcorp DeleteClientConnectorService Sample", + "description": "DeleteClientConnectorService deletes a single ClientConnectorService.", + "file": "Client/DeleteClientConnectorService/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.DeleteClientConnectorService", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientconnectorservicespb.DeleteClientConnectorServiceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteClientConnectorServiceOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "DeleteClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.DeleteClientConnectorService", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_DeleteOperation_sync", + "title": "beyondcorp DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "Client/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.DeleteOperation", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_GetClientConnectorService_sync", + "title": "beyondcorp GetClientConnectorService Sample", + "description": "GetClientConnectorService gets details of a single ClientConnectorService.", + "file": "Client/GetClientConnectorService/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.GetClientConnectorService", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientconnectorservicespb.GetClientConnectorServiceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "clientconnectorservicespb.ClientConnectorService", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "GetClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.GetClientConnectorService", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_GetIamPolicy_sync", + "title": "beyondcorp GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "Client/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.GetIamPolicy", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_GetLocation_sync", + "title": "beyondcorp GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "Client/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "locationpb.Location", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.GetLocation", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_GetOperation_sync", + "title": "beyondcorp GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.GetOperation", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_ListClientConnectorServices_sync", + "title": "beyondcorp ListClientConnectorServices Sample", + "description": "ListClientConnectorServices lists ClientConnectorServices in a given project and location.", + "file": "Client/ListClientConnectorServices/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListClientConnectorServices", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.ListClientConnectorServices", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientconnectorservicespb.ListClientConnectorServicesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ClientConnectorServiceIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "ListClientConnectorServices", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.ListClientConnectorServices", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_ListLocations_sync", + "title": "beyondcorp ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "Client/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.ListLocations", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_ListOperations_sync", + "title": "beyondcorp ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.ListOperations", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_SetIamPolicy_sync", + "title": "beyondcorp SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", + "file": "Client/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.SetIamPolicy", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_TestIamPermissions_sync", + "title": "beyondcorp TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", + "file": "Client/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.TestIamPermissionsResponse", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.TestIamPermissions", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientConnectorServicesService_UpdateClientConnectorService_sync", + "title": "beyondcorp UpdateClientConnectorService Sample", + "description": "UpdateClientConnectorService updates the parameters of a single ClientConnectorService.", + "file": "Client/UpdateClientConnectorService/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client.UpdateClientConnectorService", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientconnectorservicespb.UpdateClientConnectorServiceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpdateClientConnectorServiceOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.Client" + }, + "method": { + "shortName": "UpdateClientConnectorService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService.UpdateClientConnectorService", + "service": { + "shortName": "ClientConnectorServicesService", + "fullName": "google.cloud.beyondcorp.clientconnectorservices.v1.ClientConnectorServicesService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/CancelOperation/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/CancelOperation/main.go new file mode 100644 index 000000000000..264c1b8ba685 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/CancelOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_CancelOperation_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_CancelOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/CreateClientGateway/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/CreateClientGateway/main.go new file mode 100644 index 000000000000..dfc78521d116 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/CreateClientGateway/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + clientgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.CreateClientGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#CreateClientGatewayRequest. + } + op, err := c.CreateClientGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/DeleteClientGateway/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/DeleteClientGateway/main.go new file mode 100644 index 000000000000..da9e087c6bc4 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/DeleteClientGateway/main.go @@ -0,0 +1,51 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + clientgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.DeleteClientGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#DeleteClientGatewayRequest. + } + op, err := c.DeleteClientGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/DeleteOperation/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/DeleteOperation/main.go new file mode 100644 index 000000000000..22e72c9065cb --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/DeleteOperation/main.go @@ -0,0 +1,46 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_DeleteOperation_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_DeleteOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetClientGateway/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetClientGateway/main.go new file mode 100644 index 000000000000..a31efb495204 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetClientGateway/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + clientgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.GetClientGatewayRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#GetClientGatewayRequest. + } + resp, err := c.GetClientGateway(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetIamPolicy/main.go new file mode 100644 index 000000000000..1172530c85e5 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_GetIamPolicy_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetLocation/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetLocation/main.go new file mode 100644 index 000000000000..85b349026f27 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetLocation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_GetLocation_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_GetLocation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetOperation/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetOperation/main.go new file mode 100644 index 000000000000..08f3bda8cd25 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/GetOperation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_GetOperation_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_GetOperation_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListClientGateways/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListClientGateways/main.go new file mode 100644 index 000000000000..d30f79b813ce --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListClientGateways/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + "google.golang.org/api/iterator" + clientgatewayspb "google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &clientgatewayspb.ListClientGatewaysRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/beyondcorp/clientgateways/v1#ListClientGatewaysRequest. + } + it := c.ListClientGateways(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListLocations/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListLocations/main.go new file mode 100644 index 000000000000..979277f43d4d --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListLocations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_ListLocations_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_ListLocations_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListOperations/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListOperations/main.go new file mode 100644 index 000000000000..4780764e46ba --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/ListOperations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_ListOperations_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_ListOperations_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/SetIamPolicy/main.go new file mode 100644 index 000000000000..c2ecda493feb --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_SetIamPolicy_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/TestIamPermissions/main.go new file mode 100644 index 000000000000..ab0290eadc5f --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/Client/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START beyondcorp_v1_generated_ClientGatewaysService_TestIamPermissions_sync] + +package main + +import ( + "context" + + clientgateways "cloud.google.com/go/beyondcorp/clientgateways/apiv1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := clientgateways.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END beyondcorp_v1_generated_ClientGatewaysService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/beyondcorp/clientgateways/apiv1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json new file mode 100644 index 000000000000..2a482267e509 --- /dev/null +++ b/internal/generated/snippets/beyondcorp/clientgateways/apiv1/snippet_metadata.google.cloud.beyondcorp.clientgateways.v1.json @@ -0,0 +1,611 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/beyondcorp/clientgateways/apiv1", + "version": "0.1.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.beyondcorp.clientgateways.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_CancelOperation_sync", + "title": "beyondcorp CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "Client/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CancelOperation", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_CreateClientGateway_sync", + "title": "beyondcorp CreateClientGateway Sample", + "description": "CreateClientGateway creates a new ClientGateway in a given project and location.", + "file": "Client/CreateClientGateway/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateClientGateway", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.CreateClientGateway", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientgatewayspb.CreateClientGatewayRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateClientGatewayOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "CreateClientGateway", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.CreateClientGateway", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteClientGateway_sync", + "title": "beyondcorp DeleteClientGateway Sample", + "description": "DeleteClientGateway deletes a single ClientGateway.", + "file": "Client/DeleteClientGateway/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteClientGateway", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.DeleteClientGateway", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientgatewayspb.DeleteClientGatewayRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteClientGatewayOperation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "DeleteClientGateway", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteClientGateway", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_DeleteOperation_sync", + "title": "beyondcorp DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "Client/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.DeleteOperation", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 45, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_GetClientGateway_sync", + "title": "beyondcorp GetClientGateway Sample", + "description": "GetClientGateway gets details of a single ClientGateway.", + "file": "Client/GetClientGateway/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetClientGateway", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.GetClientGateway", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientgatewayspb.GetClientGatewayRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "clientgatewayspb.ClientGateway", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "GetClientGateway", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetClientGateway", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_GetIamPolicy_sync", + "title": "beyondcorp GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "Client/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetIamPolicy", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_GetLocation_sync", + "title": "beyondcorp GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "Client/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "locationpb.Location", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetLocation", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_GetOperation_sync", + "title": "beyondcorp GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "Client/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.GetOperation", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_ListClientGateways_sync", + "title": "beyondcorp ListClientGateways Sample", + "description": "ListClientGateways lists ClientGateways in a given project and location.", + "file": "Client/ListClientGateways/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListClientGateways", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.ListClientGateways", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "clientgatewayspb.ListClientGatewaysRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ClientGatewayIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "ListClientGateways", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListClientGateways", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_ListLocations_sync", + "title": "beyondcorp ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "Client/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListLocations", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_ListOperations_sync", + "title": "beyondcorp ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "Client/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.ListOperations", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_SetIamPolicy_sync", + "title": "beyondcorp SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", + "file": "Client/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.SetIamPolicy", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "beyondcorp_v1_generated_ClientGatewaysService_TestIamPermissions_sync", + "title": "beyondcorp TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", + "file": "Client/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.TestIamPermissionsResponse", + "client": { + "shortName": "Client", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.Client" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService.TestIamPermissions", + "service": { + "shortName": "ClientGatewaysService", + "fullName": "google.cloud.beyondcorp.clientgateways.v1.ClientGatewaysService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json b/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json index 49f29911d6fc..23f85b0a99b2 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json +++ b/internal/generated/snippets/bigquery/connection/apiv1/snippet_metadata.google.cloud.bigquery.connection.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/connection/apiv1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json b/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json index 0fa57960ad76..11c57f62880a 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/snippet_metadata.google.cloud.bigquery.connection.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/connection/apiv1beta1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json b/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json index 73f70cf9ce08..bf351d70384f 100644 --- a/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json +++ b/internal/generated/snippets/bigquery/dataexchange/apiv1beta1/snippet_metadata.google.cloud.bigquery.dataexchange.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/dataexchange/apiv1beta1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json b/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json index 10bfb73c4203..1df325df20be 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/datatransfer/apiv1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json b/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json index 4faf1df9bb75..0cb6cebb6357 100644 --- a/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json +++ b/internal/generated/snippets/bigquery/migration/apiv2/snippet_metadata.google.cloud.bigquery.migration.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/migration/apiv2", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json b/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json index dd6edac0e0a6..b51ac8dc7299 100644 --- a/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json +++ b/internal/generated/snippets/bigquery/migration/apiv2alpha/snippet_metadata.google.cloud.bigquery.migration.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/migration/apiv2alpha", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json b/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json index 0f825bcdc749..18aa3e79c6d8 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json +++ b/internal/generated/snippets/bigquery/reservation/apiv1/snippet_metadata.google.cloud.bigquery.reservation.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/reservation/apiv1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json b/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json index 550a17459d0a..77b459a80954 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/snippet_metadata.google.cloud.bigquery.reservation.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/reservation/apiv1beta1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json b/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json index ffd80e95d0cf..96cd1cb176f8 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json +++ b/internal/generated/snippets/bigquery/storage/apiv1/snippet_metadata.google.cloud.bigquery.storage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/storage/apiv1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json b/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json index 8fd67a5fcab5..944b76d07445 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json +++ b/internal/generated/snippets/bigquery/storage/apiv1beta1/snippet_metadata.google.cloud.bigquery.storage.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/storage/apiv1beta1", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json b/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json index 1db6b43fec3b..0a2a89623f19 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/snippet_metadata.google.cloud.bigquery.storage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/bigquery/storage/apiv1beta2", - "version": "1.34.1", + "version": "1.35.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/certificatemanager/apiv1/snippet_metadata.google.cloud.certificatemanager.v1.json b/internal/generated/snippets/certificatemanager/apiv1/snippet_metadata.google.cloud.certificatemanager.v1.json index e57a58c4a911..2eef8f4df7f7 100644 --- a/internal/generated/snippets/certificatemanager/apiv1/snippet_metadata.google.cloud.certificatemanager.v1.json +++ b/internal/generated/snippets/certificatemanager/apiv1/snippet_metadata.google.cloud.certificatemanager.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/certificatemanager/apiv1", - "version": "0.2.0", + "version": "0.2.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index 24aebfc3e161..9e07a9d3b5c7 100644 --- a/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/internal/generated/snippets/contactcenterinsights/apiv1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/contactcenterinsights/apiv1", - "version": "1.2.0", + "version": "1.2.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/container/apiv1/snippet_metadata.google.container.v1.json b/internal/generated/snippets/container/apiv1/snippet_metadata.google.container.v1.json index 52404211d12e..560f4873a289 100644 --- a/internal/generated/snippets/container/apiv1/snippet_metadata.google.container.v1.json +++ b/internal/generated/snippets/container/apiv1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/container/apiv1", - "version": "1.2.0", + "version": "1.3.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json b/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json index 72d9146c3fc5..2f5279b08a29 100644 --- a/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json +++ b/internal/generated/snippets/datacatalog/apiv1/snippet_metadata.google.cloud.datacatalog.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/datacatalog/apiv1", - "version": "1.3.0", + "version": "1.3.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json b/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json index 1e6016deb936..3af0665d08bd 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json +++ b/internal/generated/snippets/datacatalog/apiv1beta1/snippet_metadata.google.cloud.datacatalog.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/datacatalog/apiv1beta1", - "version": "1.3.0", + "version": "1.3.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dataflow/apiv1beta3/snippet_metadata.google.dataflow.v1beta3.json b/internal/generated/snippets/dataflow/apiv1beta3/snippet_metadata.google.dataflow.v1beta3.json index 9512d3ff28a7..d7a3cdd22180 100644 --- a/internal/generated/snippets/dataflow/apiv1beta3/snippet_metadata.google.dataflow.v1beta3.json +++ b/internal/generated/snippets/dataflow/apiv1beta3/snippet_metadata.google.dataflow.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dataflow/apiv1beta3", - "version": "0.5.0", + "version": "0.5.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dataform/apiv1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json b/internal/generated/snippets/dataform/apiv1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json index da4110762243..f85d263746bc 100644 --- a/internal/generated/snippets/dataform/apiv1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json +++ b/internal/generated/snippets/dataform/apiv1alpha2/snippet_metadata.google.cloud.dataform.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dataform/apiv1alpha2", - "version": "0.0.0", + "version": "0.1.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/deploy/apiv1/snippet_metadata.google.cloud.deploy.v1.json b/internal/generated/snippets/deploy/apiv1/snippet_metadata.google.cloud.deploy.v1.json index 90c66cd0399c..1fdcfd4cf49f 100644 --- a/internal/generated/snippets/deploy/apiv1/snippet_metadata.google.cloud.deploy.v1.json +++ b/internal/generated/snippets/deploy/apiv1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/deploy/apiv1", - "version": "1.2.0", + "version": "1.2.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json b/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json index 2cb452e96f18..bf4a6f660446 100644 --- a/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/internal/generated/snippets/dialogflow/apiv2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/apiv2", - "version": "1.11.0", + "version": "1.12.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index f179a79c3ecc..b02548079488 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/internal/generated/snippets/dialogflow/cx/apiv3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/cx/apiv3", - "version": "1.11.0", + "version": "1.12.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 6377fbadf833..e78e8db5dae3 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/dialogflow/cx/apiv3beta1", - "version": "1.11.0", + "version": "1.12.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json b/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json index 875badda01f9..db3a9215b15b 100644 --- a/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json +++ b/internal/generated/snippets/functions/apiv1/snippet_metadata.google.cloud.functions.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/functions/apiv1", - "version": "1.4.0", + "version": "1.5.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/CreateFunction/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/CreateFunction/main.go new file mode 100644 index 000000000000..d78eaaf7f3b2 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/CreateFunction/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.CreateFunctionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#CreateFunctionRequest. + } + op, err := c.CreateFunction(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/DeleteFunction/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/DeleteFunction/main.go new file mode 100644 index 000000000000..69e86d5c443f --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/DeleteFunction/main.go @@ -0,0 +1,51 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.DeleteFunctionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#DeleteFunctionRequest. + } + op, err := c.DeleteFunction(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/GenerateDownloadUrl/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/GenerateDownloadUrl/main.go new file mode 100644 index 000000000000..304cbbe50ee4 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/GenerateDownloadUrl/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.GenerateDownloadUrlRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#GenerateDownloadUrlRequest. + } + resp, err := c.GenerateDownloadUrl(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/GenerateUploadUrl/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/GenerateUploadUrl/main.go new file mode 100644 index 000000000000..2576a6db6d52 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/GenerateUploadUrl/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.GenerateUploadUrlRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#GenerateUploadUrlRequest. + } + resp, err := c.GenerateUploadUrl(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/GetFunction/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/GetFunction/main.go new file mode 100644 index 000000000000..ce587c07e5d2 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/GetFunction/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_GetFunction_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.GetFunctionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#GetFunctionRequest. + } + resp, err := c.GetFunction(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/GetIamPolicy/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/GetIamPolicy/main.go new file mode 100644 index 000000000000..265435bb5d8b --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_GetIamPolicy_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/GetOperation/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/GetOperation/main.go new file mode 100644 index 000000000000..436fde2ea957 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/GetOperation/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_GetOperation_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_GetOperation_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/ListFunctions/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/ListFunctions/main.go new file mode 100644 index 000000000000..c8c9964641dd --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/ListFunctions/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + "google.golang.org/api/iterator" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.ListFunctionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#ListFunctionsRequest. + } + it := c.ListFunctions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/ListLocations/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/ListLocations/main.go new file mode 100644 index 000000000000..8bca7f1d971f --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/ListLocations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_ListLocations_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END cloudfunctions_v2_generated_FunctionService_ListLocations_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/ListOperations/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/ListOperations/main.go new file mode 100644 index 000000000000..525e94a6435a --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/ListOperations/main.go @@ -0,0 +1,55 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_ListOperations_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + "google.golang.org/api/iterator" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END cloudfunctions_v2_generated_FunctionService_ListOperations_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/ListRuntimes/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/ListRuntimes/main.go new file mode 100644 index 000000000000..2aaf13f7edea --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/ListRuntimes/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.ListRuntimesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#ListRuntimesRequest. + } + resp, err := c.ListRuntimes(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/SetIamPolicy/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/SetIamPolicy/main.go new file mode 100644 index 000000000000..eda96451e401 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_SetIamPolicy_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/TestIamPermissions/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/TestIamPermissions/main.go new file mode 100644 index 000000000000..d2b46d740ac4 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_TestIamPermissions_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/functions/apiv2/FunctionClient/UpdateFunction/main.go b/internal/generated/snippets/functions/apiv2/FunctionClient/UpdateFunction/main.go new file mode 100644 index 000000000000..2f1672be5357 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/FunctionClient/UpdateFunction/main.go @@ -0,0 +1,53 @@ +// 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 +// +// http://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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] + +package main + +import ( + "context" + + functions "cloud.google.com/go/functions/apiv2" + functionspb "google.golang.org/genproto/googleapis/cloud/functions/v2" +) + +func main() { + ctx := context.Background() + c, err := functions.NewFunctionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &functionspb.UpdateFunctionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/functions/v2#UpdateFunctionRequest. + } + op, err := c.UpdateFunction(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json b/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json new file mode 100644 index 000000000000..7aad2de0e5d6 --- /dev/null +++ b/internal/generated/snippets/functions/apiv2/snippet_metadata.google.cloud.functions.v2.json @@ -0,0 +1,659 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/functions/apiv2", + "version": "1.5.0", + "language": "GO", + "apis": [ + { + "id": "google.cloud.functions.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_CreateFunction_sync", + "title": "cloudfunctions CreateFunction Sample", + "description": "CreateFunction creates a new function. If a function with the given name already exists in\nthe specified project, the long running operation will return\nALREADY_EXISTS error.", + "file": "FunctionClient/CreateFunction/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateFunction", + "fullName": "google.cloud.functions.v2.FunctionClient.CreateFunction", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.CreateFunctionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateFunctionOperation", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "CreateFunction", + "fullName": "google.cloud.functions.v2.FunctionService.CreateFunction", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync", + "title": "cloudfunctions DeleteFunction Sample", + "description": "DeleteFunction deletes a function with the given name from the specified project. If the\ngiven function is used by some trigger, the trigger will be updated to\nremove this function.", + "file": "FunctionClient/DeleteFunction/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteFunction", + "fullName": "google.cloud.functions.v2.FunctionClient.DeleteFunction", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.DeleteFunctionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteFunctionOperation", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "DeleteFunction", + "fullName": "google.cloud.functions.v2.FunctionService.DeleteFunction", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync", + "title": "cloudfunctions GenerateDownloadUrl Sample", + "description": "GenerateDownloadUrl returns a signed URL for downloading deployed function source code.\nThe URL is only valid for a limited period and should be used within\n30 minutes of generation.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls)", + "file": "FunctionClient/GenerateDownloadUrl/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GenerateDownloadUrl", + "fullName": "google.cloud.functions.v2.FunctionClient.GenerateDownloadUrl", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.GenerateDownloadUrlRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "functionspb.GenerateDownloadUrlResponse", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "GenerateDownloadUrl", + "fullName": "google.cloud.functions.v2.FunctionService.GenerateDownloadUrl", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync", + "title": "cloudfunctions GenerateUploadUrl Sample", + "description": "GenerateUploadUrl returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see: \nhttps: //cloud.google.com/storage/docs/access-control/signed-urls (at https: //cloud.google.com/storage/docs/access-control/signed-urls).\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions: \n\n Source file type should be a zip file.\n\n No credentials should be attached - the signed URLs provide access to the\n target bucket using internal service identity; if credentials were\n attached, the identity from the credentials would be used, but that\n identity does not have permissions to upload files to the URL.\n\nWhen making a HTTP PUT request, these two headers need to be specified: \n\n content-type: application/zip\n\nAnd this header SHOULD NOT be specified: \n\n Authorization: Bearer YOUR_TOKEN", + "file": "FunctionClient/GenerateUploadUrl/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GenerateUploadUrl", + "fullName": "google.cloud.functions.v2.FunctionClient.GenerateUploadUrl", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.GenerateUploadUrlRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "functionspb.GenerateUploadUrlResponse", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "GenerateUploadUrl", + "fullName": "google.cloud.functions.v2.FunctionService.GenerateUploadUrl", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_GetFunction_sync", + "title": "cloudfunctions GetFunction Sample", + "description": "GetFunction returns a function with the given name from the requested project.", + "file": "FunctionClient/GetFunction/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetFunction", + "fullName": "google.cloud.functions.v2.FunctionClient.GetFunction", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.GetFunctionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "functionspb.Function", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "GetFunction", + "fullName": "google.cloud.functions.v2.FunctionService.GetFunction", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_GetIamPolicy_sync", + "title": "cloudfunctions GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "FunctionClient/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.functions.v2.FunctionClient.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.functions.v2.FunctionService.GetIamPolicy", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_GetOperation_sync", + "title": "cloudfunctions GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "FunctionClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.functions.v2.FunctionClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "longrunningpb.Operation", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.cloud.functions.v2.FunctionService.GetOperation", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListFunctions_sync", + "title": "cloudfunctions ListFunctions Sample", + "description": "ListFunctions returns a list of functions that belong to the requested project.", + "file": "FunctionClient/ListFunctions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListFunctions", + "fullName": "google.cloud.functions.v2.FunctionClient.ListFunctions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.ListFunctionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "FunctionIterator", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "ListFunctions", + "fullName": "google.cloud.functions.v2.FunctionService.ListFunctions", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListLocations_sync", + "title": "cloudfunctions ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "FunctionClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.functions.v2.FunctionClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.functions.v2.FunctionService.ListLocations", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListOperations_sync", + "title": "cloudfunctions ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "FunctionClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.functions.v2.FunctionClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.cloud.functions.v2.FunctionService.ListOperations", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 54, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync", + "title": "cloudfunctions ListRuntimes Sample", + "description": "ListRuntimes returns a list of runtimes that are supported for the requested project.", + "file": "FunctionClient/ListRuntimes/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListRuntimes", + "fullName": "google.cloud.functions.v2.FunctionClient.ListRuntimes", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.ListRuntimesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "functionspb.ListRuntimesResponse", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "ListRuntimes", + "fullName": "google.cloud.functions.v2.FunctionService.ListRuntimes", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_SetIamPolicy_sync", + "title": "cloudfunctions SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED\nerrors.", + "file": "FunctionClient/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.functions.v2.FunctionClient.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.Policy", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.functions.v2.FunctionService.SetIamPolicy", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_TestIamPermissions_sync", + "title": "cloudfunctions TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may “fail open” without warning.", + "file": "FunctionClient/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.functions.v2.FunctionClient.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "iampb.TestIamPermissionsResponse", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.functions.v2.FunctionService.TestIamPermissions", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 47, + "type": "FULL" + } + ] + }, + { + "regionTag": "cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync", + "title": "cloudfunctions UpdateFunction Sample", + "description": "UpdateFunction updates existing function.", + "file": "FunctionClient/UpdateFunction/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateFunction", + "fullName": "google.cloud.functions.v2.FunctionClient.UpdateFunction", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "functionspb.UpdateFunctionRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpdateFunctionOperation", + "client": { + "shortName": "FunctionClient", + "fullName": "google.cloud.functions.v2.FunctionClient" + }, + "method": { + "shortName": "UpdateFunction", + "fullName": "google.cloud.functions.v2.FunctionService.UpdateFunction", + "service": { + "shortName": "FunctionService", + "fullName": "google.cloud.functions.v2.FunctionService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 52, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json b/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json index 581f348f6d3b..e4e92a10fdd2 100644 --- a/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json +++ b/internal/generated/snippets/functions/apiv2beta/snippet_metadata.google.cloud.functions.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/functions/apiv2beta", - "version": "1.4.0", + "version": "1.5.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/gaming/apiv1/snippet_metadata.google.cloud.gaming.v1.json b/internal/generated/snippets/gaming/apiv1/snippet_metadata.google.cloud.gaming.v1.json index 92735b4c70dd..378b5a6469ef 100644 --- a/internal/generated/snippets/gaming/apiv1/snippet_metadata.google.cloud.gaming.v1.json +++ b/internal/generated/snippets/gaming/apiv1/snippet_metadata.google.cloud.gaming.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/gaming/apiv1", - "version": "1.3.0", + "version": "1.3.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/gaming/apiv1beta/snippet_metadata.google.cloud.gaming.v1beta.json b/internal/generated/snippets/gaming/apiv1beta/snippet_metadata.google.cloud.gaming.v1beta.json index 8bdb65b1c843..7e7e1487dcd4 100644 --- a/internal/generated/snippets/gaming/apiv1beta/snippet_metadata.google.cloud.gaming.v1beta.json +++ b/internal/generated/snippets/gaming/apiv1beta/snippet_metadata.google.cloud.gaming.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/gaming/apiv1beta", - "version": "1.3.0", + "version": "1.3.1", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index bd481cfc1cb8..642469c14e6b 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -3,7 +3,7 @@ module cloud.google.com/go/internal/generated go 1.17 require ( - cloud.google.com/go v0.102.1 + cloud.google.com/go v0.103.0 cloud.google.com/go/accessapproval v1.0.1 cloud.google.com/go/accesscontextmanager v0.1.1 cloud.google.com/go/aiplatform v1.2.0 @@ -18,6 +18,7 @@ require ( cloud.google.com/go/automl v1.0.0 cloud.google.com/go/baremetalsolution v0.0.0-00010101000000-000000000000 cloud.google.com/go/batch v0.0.0-00010101000000-000000000000 + cloud.google.com/go/beyondcorp v0.0.0-00010101000000-000000000000 cloud.google.com/go/bigquery v1.26.0 cloud.google.com/go/billing v1.0.0 cloud.google.com/go/binaryauthorization v0.2.0 @@ -117,12 +118,12 @@ require ( cloud.google.com/go/webrisk v1.0.0 cloud.google.com/go/websecurityscanner v1.0.0 cloud.google.com/go/workflows v1.1.0 - google.golang.org/api v0.86.0 - google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63 + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + google.golang.org/api v0.87.0 + google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 ) require ( - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect @@ -376,3 +377,5 @@ replace cloud.google.com/go/baremetalsolution => ../../../baremetalsolution replace cloud.google.com/go/batch => ../../../batch replace cloud.google.com/go/dataform => ../../../dataform + +replace cloud.google.com/go/beyondcorp => ../../../beyondcorp diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index a8596f343128..24f26a313a6b 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -190,8 +190,9 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.86.0 h1:ZAnyOHQFIuWso1BodVfSaRyffD74T9ERGFa3k1fNk/U= google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.87.0 h1:pUQVF/F+X7Tl1lo4LJoJf5BOpjtmINU80p9XpYTU2p4= +google.golang.org/api v0.87.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -221,8 +222,10 @@ google.golang.org/genproto v0.0.0-20220630135532-f4acab7bd6cf/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220630160836-4327a74d660d/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220706132729-d86698d07c53/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220706185917-7780775163c4/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63 h1:rRPaZh5mMOfVMRDPKAoVJ4NAXqN4l4AEkKVG6hw2a5A= google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220712132514-bdd2acd4974d/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 h1:zfXhTgBfGlIh3jMXN06W8qbhFGsh6MJNJiYEuhTddOI= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/internal/godocfx/go.mod b/internal/godocfx/go.mod index c88afce2e6d8..760137e9dbc5 100644 --- a/internal/godocfx/go.mod +++ b/internal/godocfx/go.mod @@ -30,9 +30,9 @@ require ( golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect - google.golang.org/api v0.86.0 // indirect + google.golang.org/api v0.87.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63 // indirect + google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect ) diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum index 4c86332812a4..0f440794f3d9 100644 --- a/internal/godocfx/go.sum +++ b/internal/godocfx/go.sum @@ -235,8 +235,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.86.0 h1:ZAnyOHQFIuWso1BodVfSaRyffD74T9ERGFa3k1fNk/U= -google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.87.0 h1:pUQVF/F+X7Tl1lo4LJoJf5BOpjtmINU80p9XpYTU2p4= +google.golang.org/api v0.87.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -272,8 +272,8 @@ google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220622131801-db39fadba55f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63 h1:rRPaZh5mMOfVMRDPKAoVJ4NAXqN4l4AEkKVG6hw2a5A= -google.golang.org/genproto v0.0.0-20220707144311-dc4cdde2ef63/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9 h1:zfXhTgBfGlIh3jMXN06W8qbhFGsh6MJNJiYEuhTddOI= +google.golang.org/genproto v0.0.0-20220714211235-042d03aeabc9/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=