From ef1e1fb51c6c7d4b841423fc4fd2bf53b281ff41 Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Tue, 16 May 2023 09:40:13 -0500 Subject: [PATCH] chore: remove storage samples (#7946) Fixes: #7945 --- .github/.OwlBot.yaml | 4 +- .../apiv2/Client/CancelResumableWrite/main.go | 53 - .../apiv2/Client/ComposeObject/main.go | 53 - .../apiv2/Client/CreateBucket/main.go | 53 - .../apiv2/Client/CreateHmacKey/main.go | 53 - .../Client/CreateNotificationConfig/main.go | 53 - .../apiv2/Client/DeleteBucket/main.go | 51 - .../apiv2/Client/DeleteHmacKey/main.go | 51 - .../Client/DeleteNotificationConfig/main.go | 51 - .../apiv2/Client/DeleteObject/main.go | 51 - .../internal/apiv2/Client/GetBucket/main.go | 53 - .../internal/apiv2/Client/GetHmacKey/main.go | 53 - .../apiv2/Client/GetIamPolicy/main.go | 53 - .../Client/GetNotificationConfig/main.go | 53 - .../internal/apiv2/Client/GetObject/main.go | 53 - .../apiv2/Client/GetServiceAccount/main.go | 53 - .../internal/apiv2/Client/ListBuckets/main.go | 60 - .../apiv2/Client/ListHmacKeys/main.go | 60 - .../Client/ListNotificationConfigs/main.go | 60 - .../internal/apiv2/Client/ListObjects/main.go | 60 - .../Client/LockBucketRetentionPolicy/main.go | 53 - .../apiv2/Client/QueryWriteStatus/main.go | 53 - .../apiv2/Client/RewriteObject/main.go | 53 - .../apiv2/Client/SetIamPolicy/main.go | 53 - .../apiv2/Client/StartResumableWrite/main.go | 53 - .../apiv2/Client/TestIamPermissions/main.go | 53 - .../apiv2/Client/UpdateBucket/main.go | 53 - .../apiv2/Client/UpdateHmacKey/main.go | 53 - .../apiv2/Client/UpdateObject/main.go | 53 - .../snippet_metadata.google.storage.v2.json | 1299 ----------------- 30 files changed, 2 insertions(+), 2805 deletions(-) delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/CancelResumableWrite/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/ComposeObject/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/CreateBucket/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/CreateHmacKey/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/CreateNotificationConfig/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/DeleteBucket/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/DeleteHmacKey/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/DeleteNotificationConfig/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/DeleteObject/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/GetBucket/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/GetHmacKey/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/GetIamPolicy/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/GetNotificationConfig/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/GetObject/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/GetServiceAccount/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/ListBuckets/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/ListHmacKeys/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/ListNotificationConfigs/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/ListObjects/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/LockBucketRetentionPolicy/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/QueryWriteStatus/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/RewriteObject/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/SetIamPolicy/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/StartResumableWrite/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/TestIamPermissions/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/UpdateBucket/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/UpdateHmacKey/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/Client/UpdateObject/main.go delete mode 100644 internal/generated/snippets/storage/internal/apiv2/snippet_metadata.google.storage.v2.json diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 9bc96875a14..791166ddfea 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -872,8 +872,8 @@ deep-copy-regex: dest: / - source: /google/cloud/speech/v2/cloud.google.com/go dest: / - - source: /google/storage/v2/cloud.google.com/go - dest: / + - source: /google/storage/v2/cloud.google.com/go/storage/internal/apiv2 + dest: /storage/internal/apiv2 - source: /google/cloud/storageinsights/v1/cloud.google.com/go dest: / - source: /google/storagetransfer/v1/cloud.google.com/go diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/CancelResumableWrite/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/CancelResumableWrite/main.go deleted file mode 100644 index 2ebcf5800ca..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/CancelResumableWrite/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_CancelResumableWrite_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.CancelResumableWriteRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#CancelResumableWriteRequest. - } - resp, err := c.CancelResumableWrite(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_CancelResumableWrite_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/ComposeObject/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/ComposeObject/main.go deleted file mode 100644 index 70fd7199213..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/ComposeObject/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_ComposeObject_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.ComposeObjectRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#ComposeObjectRequest. - } - resp, err := c.ComposeObject(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_ComposeObject_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/CreateBucket/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/CreateBucket/main.go deleted file mode 100644 index 96b5b2ff0d3..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/CreateBucket/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_CreateBucket_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.CreateBucketRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#CreateBucketRequest. - } - resp, err := c.CreateBucket(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_CreateBucket_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/CreateHmacKey/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/CreateHmacKey/main.go deleted file mode 100644 index 695ed82ab2c..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/CreateHmacKey/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_CreateHmacKey_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.CreateHmacKeyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#CreateHmacKeyRequest. - } - resp, err := c.CreateHmacKey(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_CreateHmacKey_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/CreateNotificationConfig/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/CreateNotificationConfig/main.go deleted file mode 100644 index b28585ea15e..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/CreateNotificationConfig/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_CreateNotificationConfig_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.CreateNotificationConfigRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#CreateNotificationConfigRequest. - } - resp, err := c.CreateNotificationConfig(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_CreateNotificationConfig_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteBucket/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/DeleteBucket/main.go deleted file mode 100644 index 73ca9e95256..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteBucket/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_DeleteBucket_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.DeleteBucketRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#DeleteBucketRequest. - } - err = c.DeleteBucket(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END storage_v2_generated_Storage_DeleteBucket_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteHmacKey/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/DeleteHmacKey/main.go deleted file mode 100644 index f0531ddc0ce..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteHmacKey/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_DeleteHmacKey_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.DeleteHmacKeyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#DeleteHmacKeyRequest. - } - err = c.DeleteHmacKey(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END storage_v2_generated_Storage_DeleteHmacKey_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteNotificationConfig/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/DeleteNotificationConfig/main.go deleted file mode 100644 index 4fbbe2b4840..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteNotificationConfig/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_DeleteNotificationConfig_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.DeleteNotificationConfigRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#DeleteNotificationConfigRequest. - } - err = c.DeleteNotificationConfig(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END storage_v2_generated_Storage_DeleteNotificationConfig_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteObject/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/DeleteObject/main.go deleted file mode 100644 index c4241fcf9f2..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/DeleteObject/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_DeleteObject_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.DeleteObjectRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#DeleteObjectRequest. - } - err = c.DeleteObject(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END storage_v2_generated_Storage_DeleteObject_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/GetBucket/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/GetBucket/main.go deleted file mode 100644 index 73c3d8c7f00..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/GetBucket/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_GetBucket_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.GetBucketRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#GetBucketRequest. - } - resp, err := c.GetBucket(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_GetBucket_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/GetHmacKey/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/GetHmacKey/main.go deleted file mode 100644 index 00a3fc39b7f..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/GetHmacKey/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_GetHmacKey_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.GetHmacKeyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#GetHmacKeyRequest. - } - resp, err := c.GetHmacKey(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_GetHmacKey_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/GetIamPolicy/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/GetIamPolicy/main.go deleted file mode 100644 index 632fb41baa0..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/GetIamPolicy/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_GetIamPolicy_sync] - -package main - -import ( - "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - storage "cloud.google.com/go/storage/internal/apiv2" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &iampb.GetIamPolicyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. - } - resp, err := c.GetIamPolicy(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_GetIamPolicy_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/GetNotificationConfig/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/GetNotificationConfig/main.go deleted file mode 100644 index c819aa86a7d..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/GetNotificationConfig/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_GetNotificationConfig_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.GetNotificationConfigRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#GetNotificationConfigRequest. - } - resp, err := c.GetNotificationConfig(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_GetNotificationConfig_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/GetObject/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/GetObject/main.go deleted file mode 100644 index 5490b8a4fd8..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/GetObject/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_GetObject_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.GetObjectRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#GetObjectRequest. - } - resp, err := c.GetObject(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_GetObject_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/GetServiceAccount/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/GetServiceAccount/main.go deleted file mode 100644 index e86876062a2..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/GetServiceAccount/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_GetServiceAccount_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.GetServiceAccountRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#GetServiceAccountRequest. - } - resp, err := c.GetServiceAccount(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_GetServiceAccount_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/ListBuckets/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/ListBuckets/main.go deleted file mode 100644 index 7f32c5786d9..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/ListBuckets/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_ListBuckets_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.ListBucketsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#ListBucketsRequest. - } - it := c.ListBuckets(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END storage_v2_generated_Storage_ListBuckets_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/ListHmacKeys/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/ListHmacKeys/main.go deleted file mode 100644 index ae212c1de41..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/ListHmacKeys/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_ListHmacKeys_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.ListHmacKeysRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#ListHmacKeysRequest. - } - it := c.ListHmacKeys(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END storage_v2_generated_Storage_ListHmacKeys_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/ListNotificationConfigs/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/ListNotificationConfigs/main.go deleted file mode 100644 index 6928f111fa6..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/ListNotificationConfigs/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_ListNotificationConfigs_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.ListNotificationConfigsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#ListNotificationConfigsRequest. - } - it := c.ListNotificationConfigs(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END storage_v2_generated_Storage_ListNotificationConfigs_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/ListObjects/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/ListObjects/main.go deleted file mode 100644 index ab66403ce4d..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/ListObjects/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_ListObjects_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.ListObjectsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#ListObjectsRequest. - } - it := c.ListObjects(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END storage_v2_generated_Storage_ListObjects_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/LockBucketRetentionPolicy/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/LockBucketRetentionPolicy/main.go deleted file mode 100644 index 8ca14e0319c..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/LockBucketRetentionPolicy/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_LockBucketRetentionPolicy_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.LockBucketRetentionPolicyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#LockBucketRetentionPolicyRequest. - } - resp, err := c.LockBucketRetentionPolicy(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_LockBucketRetentionPolicy_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/QueryWriteStatus/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/QueryWriteStatus/main.go deleted file mode 100644 index 4e67f501e35..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/QueryWriteStatus/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_QueryWriteStatus_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.QueryWriteStatusRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#QueryWriteStatusRequest. - } - resp, err := c.QueryWriteStatus(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_QueryWriteStatus_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/RewriteObject/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/RewriteObject/main.go deleted file mode 100644 index e5321caac3b..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/RewriteObject/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_RewriteObject_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.RewriteObjectRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#RewriteObjectRequest. - } - resp, err := c.RewriteObject(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_RewriteObject_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/SetIamPolicy/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/SetIamPolicy/main.go deleted file mode 100644 index 93b6cd76370..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/SetIamPolicy/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_SetIamPolicy_sync] - -package main - -import ( - "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - storage "cloud.google.com/go/storage/internal/apiv2" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &iampb.SetIamPolicyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. - } - resp, err := c.SetIamPolicy(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_SetIamPolicy_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/StartResumableWrite/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/StartResumableWrite/main.go deleted file mode 100644 index b5bf3f7eab3..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/StartResumableWrite/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_StartResumableWrite_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.StartResumableWriteRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#StartResumableWriteRequest. - } - resp, err := c.StartResumableWrite(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_StartResumableWrite_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/TestIamPermissions/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/TestIamPermissions/main.go deleted file mode 100644 index 5023a7823a9..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/TestIamPermissions/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_TestIamPermissions_sync] - -package main - -import ( - "context" - - iampb "cloud.google.com/go/iam/apiv1/iampb" - storage "cloud.google.com/go/storage/internal/apiv2" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &iampb.TestIamPermissionsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. - } - resp, err := c.TestIamPermissions(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_TestIamPermissions_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/UpdateBucket/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/UpdateBucket/main.go deleted file mode 100644 index 524dc5acfeb..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/UpdateBucket/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_UpdateBucket_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.UpdateBucketRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#UpdateBucketRequest. - } - resp, err := c.UpdateBucket(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_UpdateBucket_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/UpdateHmacKey/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/UpdateHmacKey/main.go deleted file mode 100644 index 0bf7504bc7a..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/UpdateHmacKey/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_UpdateHmacKey_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.UpdateHmacKeyRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#UpdateHmacKeyRequest. - } - resp, err := c.UpdateHmacKey(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_UpdateHmacKey_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/Client/UpdateObject/main.go b/internal/generated/snippets/storage/internal/apiv2/Client/UpdateObject/main.go deleted file mode 100644 index 519eaaf7d69..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/Client/UpdateObject/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 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 -// -// https://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 protoc-gen-go_gapic. DO NOT EDIT. - -// [START storage_v2_generated_Storage_UpdateObject_sync] - -package main - -import ( - "context" - - storage "cloud.google.com/go/storage/internal/apiv2" - storagepb "cloud.google.com/go/storage/internal/apiv2/storagepb" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := storage.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &storagepb.UpdateObjectRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/cloud.google.com/go/storage/internal/apiv2/storagepb#UpdateObjectRequest. - } - resp, err := c.UpdateObject(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END storage_v2_generated_Storage_UpdateObject_sync] diff --git a/internal/generated/snippets/storage/internal/apiv2/snippet_metadata.google.storage.v2.json b/internal/generated/snippets/storage/internal/apiv2/snippet_metadata.google.storage.v2.json deleted file mode 100644 index 51db86a7179..00000000000 --- a/internal/generated/snippets/storage/internal/apiv2/snippet_metadata.google.storage.v2.json +++ /dev/null @@ -1,1299 +0,0 @@ -{ - "clientLibrary": { - "name": "cloud.google.com/go/storage/internal/apiv2", - "version": "1.30.1", - "language": "GO", - "apis": [ - { - "id": "google.storage.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "storage_v2_generated_Storage_CancelResumableWrite_sync", - "title": "storage CancelResumableWrite Sample", - "description": "CancelResumableWrite cancels an in-progress resumable upload.\n\nAny attempts to write to the resumable upload after cancelling the upload\nwill fail.\n\nThe behavior for currently in progress write operations is not guaranteed -\nthey could either complete before the cancellation or fail if the\ncancellation completes first.", - "file": "Client/CancelResumableWrite/main.go", - "language": "GO", - "clientMethod": { - "shortName": "CancelResumableWrite", - "fullName": "google.storage.v2.Client.CancelResumableWrite", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.CancelResumableWriteRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.CancelResumableWriteResponse", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "CancelResumableWrite", - "fullName": "google.storage.v2.Storage.CancelResumableWrite", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_ComposeObject_sync", - "title": "storage ComposeObject Sample", - "description": "ComposeObject concatenates a list of existing objects into a new object in the same\nbucket.", - "file": "Client/ComposeObject/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ComposeObject", - "fullName": "google.storage.v2.Client.ComposeObject", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.ComposeObjectRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Object", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "ComposeObject", - "fullName": "google.storage.v2.Storage.ComposeObject", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_CreateBucket_sync", - "title": "storage CreateBucket Sample", - "description": "CreateBucket creates a new bucket.", - "file": "Client/CreateBucket/main.go", - "language": "GO", - "clientMethod": { - "shortName": "CreateBucket", - "fullName": "google.storage.v2.Client.CreateBucket", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.CreateBucketRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Bucket", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "CreateBucket", - "fullName": "google.storage.v2.Storage.CreateBucket", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_CreateHmacKey_sync", - "title": "storage CreateHmacKey Sample", - "description": "CreateHmacKey creates a new HMAC key for the given service account.", - "file": "Client/CreateHmacKey/main.go", - "language": "GO", - "clientMethod": { - "shortName": "CreateHmacKey", - "fullName": "google.storage.v2.Client.CreateHmacKey", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.CreateHmacKeyRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.CreateHmacKeyResponse", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "CreateHmacKey", - "fullName": "google.storage.v2.Storage.CreateHmacKey", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_CreateNotificationConfig_sync", - "title": "storage CreateNotificationConfig Sample", - "description": "CreateNotificationConfig creates a NotificationConfig for a given bucket.\nThese NotificationConfigs, when triggered, publish messages to the\nspecified Pub/Sub topics. See\nhttps: //cloud.google.com/storage/docs/pubsub-notifications.", - "file": "Client/CreateNotificationConfig/main.go", - "language": "GO", - "clientMethod": { - "shortName": "CreateNotificationConfig", - "fullName": "google.storage.v2.Client.CreateNotificationConfig", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.CreateNotificationConfigRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.NotificationConfig", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "CreateNotificationConfig", - "fullName": "google.storage.v2.Storage.CreateNotificationConfig", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_DeleteBucket_sync", - "title": "storage DeleteBucket Sample", - "description": "DeleteBucket permanently deletes an empty bucket.", - "file": "Client/DeleteBucket/main.go", - "language": "GO", - "clientMethod": { - "shortName": "DeleteBucket", - "fullName": "google.storage.v2.Client.DeleteBucket", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.DeleteBucketRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "DeleteBucket", - "fullName": "google.storage.v2.Storage.DeleteBucket", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 51, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_DeleteHmacKey_sync", - "title": "storage DeleteHmacKey Sample", - "description": "DeleteHmacKey deletes a given HMAC key. Key must be in an INACTIVE state.", - "file": "Client/DeleteHmacKey/main.go", - "language": "GO", - "clientMethod": { - "shortName": "DeleteHmacKey", - "fullName": "google.storage.v2.Client.DeleteHmacKey", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.DeleteHmacKeyRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "DeleteHmacKey", - "fullName": "google.storage.v2.Storage.DeleteHmacKey", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 51, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_DeleteNotificationConfig_sync", - "title": "storage DeleteNotificationConfig Sample", - "description": "DeleteNotificationConfig permanently deletes a NotificationConfig.", - "file": "Client/DeleteNotificationConfig/main.go", - "language": "GO", - "clientMethod": { - "shortName": "DeleteNotificationConfig", - "fullName": "google.storage.v2.Client.DeleteNotificationConfig", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.DeleteNotificationConfigRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "DeleteNotificationConfig", - "fullName": "google.storage.v2.Storage.DeleteNotificationConfig", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 51, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_DeleteObject_sync", - "title": "storage DeleteObject Sample", - "description": "DeleteObject deletes an object and its metadata.\n\nDeletions are normally permanent when versioning is disabled or whenever\nthe generation parameter is used. However, if soft delete is enabled for\nthe bucket, deleted objects can be restored using RestoreObject until the\nsoft delete retention period has passed.", - "file": "Client/DeleteObject/main.go", - "language": "GO", - "clientMethod": { - "shortName": "DeleteObject", - "fullName": "google.storage.v2.Client.DeleteObject", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.DeleteObjectRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "DeleteObject", - "fullName": "google.storage.v2.Storage.DeleteObject", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 51, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_GetBucket_sync", - "title": "storage GetBucket Sample", - "description": "GetBucket returns metadata for the specified bucket.", - "file": "Client/GetBucket/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetBucket", - "fullName": "google.storage.v2.Client.GetBucket", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.GetBucketRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Bucket", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "GetBucket", - "fullName": "google.storage.v2.Storage.GetBucket", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_GetHmacKey_sync", - "title": "storage GetHmacKey Sample", - "description": "GetHmacKey gets an existing HMAC key metadata for the given id.", - "file": "Client/GetHmacKey/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetHmacKey", - "fullName": "google.storage.v2.Client.GetHmacKey", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.GetHmacKeyRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.HmacKeyMetadata", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "GetHmacKey", - "fullName": "google.storage.v2.Storage.GetHmacKey", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_GetIamPolicy_sync", - "title": "storage GetIamPolicy Sample", - "description": "GetIamPolicy gets the IAM policy for a specified bucket or object.\nThe `resource` field in the request should be\nprojects/_/buckets/ for a bucket or\nprojects/_/buckets//objects/ for an object.", - "file": "Client/GetIamPolicy/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetIamPolicy", - "fullName": "google.storage.v2.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.storage.v2.Client" - }, - "method": { - "shortName": "GetIamPolicy", - "fullName": "google.storage.v2.Storage.GetIamPolicy", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_GetNotificationConfig_sync", - "title": "storage GetNotificationConfig Sample", - "description": "GetNotificationConfig view a NotificationConfig.", - "file": "Client/GetNotificationConfig/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetNotificationConfig", - "fullName": "google.storage.v2.Client.GetNotificationConfig", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.GetNotificationConfigRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.NotificationConfig", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "GetNotificationConfig", - "fullName": "google.storage.v2.Storage.GetNotificationConfig", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_GetObject_sync", - "title": "storage GetObject Sample", - "description": "GetObject retrieves an object's metadata.", - "file": "Client/GetObject/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetObject", - "fullName": "google.storage.v2.Client.GetObject", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.GetObjectRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Object", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "GetObject", - "fullName": "google.storage.v2.Storage.GetObject", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_GetServiceAccount_sync", - "title": "storage GetServiceAccount Sample", - "description": "GetServiceAccount retrieves the name of a project's Google Cloud Storage service account.", - "file": "Client/GetServiceAccount/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetServiceAccount", - "fullName": "google.storage.v2.Client.GetServiceAccount", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.GetServiceAccountRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.ServiceAccount", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "GetServiceAccount", - "fullName": "google.storage.v2.Storage.GetServiceAccount", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_ListBuckets_sync", - "title": "storage ListBuckets Sample", - "description": "ListBuckets retrieves a list of buckets for a given project.", - "file": "Client/ListBuckets/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListBuckets", - "fullName": "google.storage.v2.Client.ListBuckets", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.ListBucketsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "BucketIterator", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "ListBuckets", - "fullName": "google.storage.v2.Storage.ListBuckets", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 60, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_ListHmacKeys_sync", - "title": "storage ListHmacKeys Sample", - "description": "ListHmacKeys lists HMAC keys under a given project with the additional filters provided.", - "file": "Client/ListHmacKeys/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListHmacKeys", - "fullName": "google.storage.v2.Client.ListHmacKeys", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.ListHmacKeysRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "HmacKeyMetadataIterator", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "ListHmacKeys", - "fullName": "google.storage.v2.Storage.ListHmacKeys", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 60, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_ListNotificationConfigs_sync", - "title": "storage ListNotificationConfigs Sample", - "description": "ListNotificationConfigs retrieves a list of NotificationConfigs for a given bucket.", - "file": "Client/ListNotificationConfigs/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListNotificationConfigs", - "fullName": "google.storage.v2.Client.ListNotificationConfigs", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.ListNotificationConfigsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "NotificationConfigIterator", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "ListNotificationConfigs", - "fullName": "google.storage.v2.Storage.ListNotificationConfigs", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 60, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_ListObjects_sync", - "title": "storage ListObjects Sample", - "description": "ListObjects retrieves a list of objects matching the criteria.", - "file": "Client/ListObjects/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListObjects", - "fullName": "google.storage.v2.Client.ListObjects", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.ListObjectsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "ObjectIterator", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "ListObjects", - "fullName": "google.storage.v2.Storage.ListObjects", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 60, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_LockBucketRetentionPolicy_sync", - "title": "storage LockBucketRetentionPolicy Sample", - "description": "LockBucketRetentionPolicy locks retention policy on a bucket.", - "file": "Client/LockBucketRetentionPolicy/main.go", - "language": "GO", - "clientMethod": { - "shortName": "LockBucketRetentionPolicy", - "fullName": "google.storage.v2.Client.LockBucketRetentionPolicy", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.LockBucketRetentionPolicyRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Bucket", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "LockBucketRetentionPolicy", - "fullName": "google.storage.v2.Storage.LockBucketRetentionPolicy", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_QueryWriteStatus_sync", - "title": "storage QueryWriteStatus Sample", - "description": "QueryWriteStatus determines the `persisted_size` for an object that is being written, which\ncan then be used as the `write_offset` for the next `Write()` call.\n\nIf the object does not exist (i.e., the object has been deleted, or the\nfirst `Write()` has not yet reached the service), this method returns the\nerror `NOT_FOUND`.\n\nThe client **may** call `QueryWriteStatus()` at any time to determine how\nmuch data has been processed for this object. This is useful if the\nclient is buffering data and needs to know which data can be safely\nevicted. For any sequence of `QueryWriteStatus()` calls for a given\nobject name, the sequence of returned `persisted_size` values will be\nnon-decreasing.", - "file": "Client/QueryWriteStatus/main.go", - "language": "GO", - "clientMethod": { - "shortName": "QueryWriteStatus", - "fullName": "google.storage.v2.Client.QueryWriteStatus", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.QueryWriteStatusRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.QueryWriteStatusResponse", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "QueryWriteStatus", - "fullName": "google.storage.v2.Storage.QueryWriteStatus", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_RewriteObject_sync", - "title": "storage RewriteObject Sample", - "description": "RewriteObject rewrites a source object to a destination object. Optionally overrides\nmetadata.", - "file": "Client/RewriteObject/main.go", - "language": "GO", - "clientMethod": { - "shortName": "RewriteObject", - "fullName": "google.storage.v2.Client.RewriteObject", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.RewriteObjectRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.RewriteResponse", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "RewriteObject", - "fullName": "google.storage.v2.Storage.RewriteObject", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_SetIamPolicy_sync", - "title": "storage SetIamPolicy Sample", - "description": "SetIamPolicy updates an IAM policy for the specified bucket or object.\nThe `resource` field in the request should be\nprojects/_/buckets/ for a bucket or\nprojects/_/buckets//objects/ for an object.", - "file": "Client/SetIamPolicy/main.go", - "language": "GO", - "clientMethod": { - "shortName": "SetIamPolicy", - "fullName": "google.storage.v2.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.storage.v2.Client" - }, - "method": { - "shortName": "SetIamPolicy", - "fullName": "google.storage.v2.Storage.SetIamPolicy", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_StartResumableWrite_sync", - "title": "storage StartResumableWrite Sample", - "description": "StartResumableWrite starts a resumable write. How long the write operation remains valid, and\nwhat happens when the write operation becomes invalid, are\nservice-dependent.", - "file": "Client/StartResumableWrite/main.go", - "language": "GO", - "clientMethod": { - "shortName": "StartResumableWrite", - "fullName": "google.storage.v2.Client.StartResumableWrite", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.StartResumableWriteRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.StartResumableWriteResponse", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "StartResumableWrite", - "fullName": "google.storage.v2.Storage.StartResumableWrite", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_TestIamPermissions_sync", - "title": "storage TestIamPermissions Sample", - "description": "TestIamPermissions tests a set of permissions on the given bucket or object to see which, if\nany, are held by the caller.\nThe `resource` field in the request should be\nprojects/_/buckets/ for a bucket or\nprojects/_/buckets//objects/ for an object.", - "file": "Client/TestIamPermissions/main.go", - "language": "GO", - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.storage.v2.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.storage.v2.Client" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.storage.v2.Storage.TestIamPermissions", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_UpdateBucket_sync", - "title": "storage UpdateBucket Sample", - "description": "UpdateBucket updates a bucket. Equivalent to JSON API's storage.buckets.patch method.", - "file": "Client/UpdateBucket/main.go", - "language": "GO", - "clientMethod": { - "shortName": "UpdateBucket", - "fullName": "google.storage.v2.Client.UpdateBucket", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.UpdateBucketRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Bucket", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "UpdateBucket", - "fullName": "google.storage.v2.Storage.UpdateBucket", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_UpdateHmacKey_sync", - "title": "storage UpdateHmacKey Sample", - "description": "UpdateHmacKey updates a given HMAC key state between ACTIVE and INACTIVE.", - "file": "Client/UpdateHmacKey/main.go", - "language": "GO", - "clientMethod": { - "shortName": "UpdateHmacKey", - "fullName": "google.storage.v2.Client.UpdateHmacKey", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.UpdateHmacKeyRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.HmacKeyMetadata", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "UpdateHmacKey", - "fullName": "google.storage.v2.Storage.UpdateHmacKey", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "storage_v2_generated_Storage_UpdateObject_sync", - "title": "storage UpdateObject Sample", - "description": "UpdateObject updates an object's metadata.\nEquivalent to JSON API's storage.objects.patch.", - "file": "Client/UpdateObject/main.go", - "language": "GO", - "clientMethod": { - "shortName": "UpdateObject", - "fullName": "google.storage.v2.Client.UpdateObject", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "storagepb.UpdateObjectRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*storagepb.Object", - "client": { - "shortName": "Client", - "fullName": "google.storage.v2.Client" - }, - "method": { - "shortName": "UpdateObject", - "fullName": "google.storage.v2.Storage.UpdateObject", - "service": { - "shortName": "Storage", - "fullName": "google.storage.v2.Storage" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file