diff --git a/internal/gapicgen/generator/gapics.go b/internal/gapicgen/generator/gapics.go index 98a4d1aaf8d..fe53aafafab 100644 --- a/internal/gapicgen/generator/gapics.go +++ b/internal/gapicgen/generator/gapics.go @@ -111,7 +111,7 @@ func (g *GapicGenerator) RegenSnippets(ctx context.Context) error { return err } if err := gensnippets.Generate(g.googleCloudDir, snippetDir, apiShortnames); err != nil { - return fmt.Errorf("error generating snippets: %v", err) + log.Printf("warning: got the following non-fatal errors generating snippets: %v", err) } if err := replaceAllForSnippets(g.googleCloudDir, snippetDir); err != nil { return err diff --git a/internal/gapicgen/gensnippets/gensnippets.go b/internal/gapicgen/gensnippets/gensnippets.go index 44e1ce782d6..0c172fdc7c6 100644 --- a/internal/gapicgen/gensnippets/gensnippets.go +++ b/internal/gapicgen/gensnippets/gensnippets.go @@ -31,6 +31,8 @@ import ( "cloud.google.com/go/internal/godocfx/pkgload" "cloud.google.com/go/third_party/go/doc" "golang.org/x/sys/execabs" + "google.golang.org/genproto/googleapis/gapic/metadata" + "google.golang.org/protobuf/encoding/protojson" ) // Generate reads all modules in rootDir and outputs their examples in outDir. @@ -68,13 +70,13 @@ func Generate(rootDir, outDir string, apiShortnames map[string]string) error { return fmt.Errorf("failed to load packages: %v", err) } for _, pi := range pis { - if err := processExamples(pi.Doc, pi.Fset, trimPrefix, outDir, apiShortnames); err != nil { - errs = append(errs, fmt.Errorf("failed to process examples: %v", err)) + if eErrs := processExamples(pi.Doc, pi.Fset, trimPrefix, rootDir, outDir, apiShortnames); len(eErrs) > 0 { + errs = append(errs, fmt.Errorf("%v", eErrs)) } } } if len(errs) > 0 { - log.Fatal(errs) + return fmt.Errorf("example errors: %v", errs) } if len(dirs) > 0 { @@ -103,69 +105,90 @@ var skip = map[string]bool{ "cloud.google.com/go/translate": true, // Has newer version. } -func processExamples(pkg *doc.Package, fset *token.FileSet, trimPrefix, outDir string, apiShortnames map[string]string) error { +func processExamples(pkg *doc.Package, fset *token.FileSet, trimPrefix, rootDir, outDir string, apiShortnames map[string]string) []error { if skip[pkg.ImportPath] { return nil } trimmed := strings.TrimPrefix(pkg.ImportPath, trimPrefix) + regionTags, err := computeRegionTags(rootDir, trimmed, apiShortnames) + if err != nil { + return []error{err} + } + if len(regionTags) == 0 { + // Nothing to do. + return nil + } outDir = filepath.Join(outDir, trimmed) - shortname, ok := apiShortnames[pkg.ImportPath] - if !ok { - // Do our best to find a shortname. For example, - // cloud.google.com/go/bigtable/bttest should lead to - // cloud.google.com/go/bigtable. - bestMatch := "" - for path := range apiShortnames { - if strings.HasPrefix(pkg.ImportPath, path) { - if len(path) > len(bestMatch) { - bestMatch = path - } + // Note: only process methods because they correspond to RPCs. + + var errs []error + for _, t := range pkg.Types { + for _, m := range t.Methods { + if len(m.Examples) == 0 { + // Nothing to do for this method. + continue + } + dir := filepath.Join(outDir, t.Name, m.Name) + regionTag, ok := regionTags[t.Name][m.Name] + if !ok { + errs = append(errs, fmt.Errorf("could not find region tag for %s %s.%s", pkg.ImportPath, t.Name, m.Name)) + continue + } + if err := writeExamples(dir, m.Examples, fset, regionTag); err != nil { + errs = append(errs, err) } } - if bestMatch == "" { - return fmt.Errorf("could not find API shortname for %v", pkg.ImportPath) - } - log.Printf("The best match for %q is %q", pkg.ImportPath, bestMatch) - shortname = apiShortnames[bestMatch] } - regionTag := shortname + "_generated" + strings.ReplaceAll(trimmed, "/", "_") - - // Note: variables and constants don't have examples. + return errs +} - for _, f := range pkg.Funcs { - dir := filepath.Join(outDir, f.Name) - if err := writeExamples(dir, f.Examples, fset, regionTag); err != nil { - return err - } +// computeRegionTags gets the region tags for the given path, keyed by client name and method name. +func computeRegionTags(rootDir, path string, apiShortnames map[string]string) (regionTags map[string]map[string]string, err error) { + metadataPath := filepath.Join(rootDir, path, "gapic_metadata.json") + f, err := os.ReadFile(metadataPath) + if err != nil { + // If there is no gapic_metadata.json file, don't generate snippets. + // This isn't an error, though, because some packages aren't GAPICs and + // shouldn't get snippets in the first place. + return nil, nil + } + m := metadata.GapicMetadata{} + if err := protojson.Unmarshal(f, &m); err != nil { + return nil, err + } + shortname, ok := apiShortnames[m.GetLibraryPackage()] + if !ok { + return nil, fmt.Errorf("could not find shortname for %q", m.GetLibraryPackage()) } + protoParts := strings.Split(m.GetProtoPackage(), ".") + apiVersion := protoParts[len(protoParts)-1] - for _, t := range pkg.Types { - dir := filepath.Join(outDir, t.Name) - if err := writeExamples(dir, t.Examples, fset, regionTag); err != nil { - return err - } - for _, f := range t.Funcs { - fDir := filepath.Join(dir, f.Name) - if err := writeExamples(fDir, f.Examples, fset, regionTag); err != nil { - return err - } - } - for _, m := range t.Methods { - mDir := filepath.Join(dir, m.Name) - if err := writeExamples(mDir, m.Examples, fset, regionTag); err != nil { - return err + regionTags = map[string]map[string]string{} + for sName, s := range m.GetServices() { + for _, c := range s.GetClients() { + for rpc, methods := range c.GetRpcs() { + if len(methods.GetMethods()) != 1 { + return nil, fmt.Errorf("%s %s %s found %d methods", m.GetLibraryPackage(), sName, c.GetLibraryClient(), len(methods.GetMethods())) + } + if methods.GetMethods()[0] != rpc { + return nil, fmt.Errorf("%s %s %s %q does not match %q", m.GetLibraryPackage(), sName, c.GetLibraryClient(), methods.GetMethods()[0], rpc) + } + + // Every Go method is synchronous. + regionTag := fmt.Sprintf("%s_%s_generated_%s_%s_sync", shortname, apiVersion, sName, rpc) + + if regionTags[c.GetLibraryClient()] == nil { + regionTags[c.GetLibraryClient()] = map[string]string{} + } + regionTags[c.GetLibraryClient()][rpc] = regionTag } } } - return nil + return regionTags, nil } func writeExamples(outDir string, exs []*doc.Example, fset *token.FileSet, regionTag string) error { - if len(exs) == 0 { - // Nothing to do. - return nil - } for _, ex := range exs { dir := outDir if len(exs) > 1 { @@ -207,7 +230,12 @@ func writeExamples(outDir string, exs []*doc.Example, fset *token.FileSet, regio if _, err := f.WriteString(header()); err != nil { return err } - tag := regionTag + "_" + ex.Name + + tag := regionTag + if len(ex.Suffix) > 0 { + tag += "_" + ex.Suffix + } + // Include an extra newline to keep separate from the package declaration. if _, err := fmt.Fprintf(f, "// [START %v]\n\n", tag); err != nil { return err diff --git a/internal/gapicgen/go.mod b/internal/gapicgen/go.mod index 0210c787249..43173316bb5 100644 --- a/internal/gapicgen/go.mod +++ b/internal/gapicgen/go.mod @@ -14,6 +14,8 @@ require ( golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/sys v0.0.0-20210415045647-66c3f260301c + google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 + google.golang.org/protobuf v1.26.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/src-d/go-git.v4 v4.13.1 gopkg.in/yaml.v2 v2.4.0 diff --git a/internal/gapicgen/go.sum b/internal/gapicgen/go.sum index d41a26d3d09..68ae59c0e02 100644 --- a/internal/gapicgen/go.sum +++ b/internal/gapicgen/go.sum @@ -477,6 +477,7 @@ google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 h1:E7wSQBXkH3T3diucK+9Z1kjn4+/9tNG7lZLr75oOhh8= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/ApproveApprovalRequest/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/ApproveApprovalRequest/main.go index 41dbb63506e..700d479bc37 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/ApproveApprovalRequest/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/ApproveApprovalRequest/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_ApproveApprovalRequest] +// [START accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END accessapproval_generated_accessapproval_apiv1_Client_ApproveApprovalRequest] +// [END accessapproval_v1_generated_AccessApproval_ApproveApprovalRequest_sync] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/DeleteAccessApprovalSettings/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/DeleteAccessApprovalSettings/main.go index 78bd17cb7e8..c6a4eb2ce92 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/DeleteAccessApprovalSettings/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/DeleteAccessApprovalSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_DeleteAccessApprovalSettings] +// [START accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END accessapproval_generated_accessapproval_apiv1_Client_DeleteAccessApprovalSettings] +// [END accessapproval_v1_generated_AccessApproval_DeleteAccessApprovalSettings_sync] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/DismissApprovalRequest/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/DismissApprovalRequest/main.go index 756043d5dc6..eaf4d4fe985 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/DismissApprovalRequest/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/DismissApprovalRequest/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_DismissApprovalRequest] +// [START accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END accessapproval_generated_accessapproval_apiv1_Client_DismissApprovalRequest] +// [END accessapproval_v1_generated_AccessApproval_DismissApprovalRequest_sync] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/GetAccessApprovalSettings/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/GetAccessApprovalSettings/main.go index 0a205feab97..0c465c33541 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/GetAccessApprovalSettings/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/GetAccessApprovalSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_GetAccessApprovalSettings] +// [START accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END accessapproval_generated_accessapproval_apiv1_Client_GetAccessApprovalSettings] +// [END accessapproval_v1_generated_AccessApproval_GetAccessApprovalSettings_sync] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/GetApprovalRequest/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/GetApprovalRequest/main.go index 5a67e0fe999..7837e316b7e 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/GetApprovalRequest/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/GetApprovalRequest/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_GetApprovalRequest] +// [START accessapproval_v1_generated_AccessApproval_GetApprovalRequest_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END accessapproval_generated_accessapproval_apiv1_Client_GetApprovalRequest] +// [END accessapproval_v1_generated_AccessApproval_GetApprovalRequest_sync] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/ListApprovalRequests/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/ListApprovalRequests/main.go index e5c73079ca7..7b380476813 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/ListApprovalRequests/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/ListApprovalRequests/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_ListApprovalRequests] +// [START accessapproval_v1_generated_AccessApproval_ListApprovalRequests_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END accessapproval_generated_accessapproval_apiv1_Client_ListApprovalRequests] +// [END accessapproval_v1_generated_AccessApproval_ListApprovalRequests_sync] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/NewClient/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/NewClient/main.go deleted file mode 100644 index 3f6cf956730..00000000000 --- a/internal/generated/snippets/accessapproval/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START accessapproval_generated_accessapproval_apiv1_NewClient] - -package main - -import ( - "context" - - accessapproval "cloud.google.com/go/accessapproval/apiv1" -) - -func main() { - ctx := context.Background() - c, err := accessapproval.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END accessapproval_generated_accessapproval_apiv1_NewClient] diff --git a/internal/generated/snippets/accessapproval/apiv1/Client/UpdateAccessApprovalSettings/main.go b/internal/generated/snippets/accessapproval/apiv1/Client/UpdateAccessApprovalSettings/main.go index 11421ed2508..ac127432471 100644 --- a/internal/generated/snippets/accessapproval/apiv1/Client/UpdateAccessApprovalSettings/main.go +++ b/internal/generated/snippets/accessapproval/apiv1/Client/UpdateAccessApprovalSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START accessapproval_generated_accessapproval_apiv1_Client_UpdateAccessApprovalSettings] +// [START accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END accessapproval_generated_accessapproval_apiv1_Client_UpdateAccessApprovalSettings] +// [END accessapproval_v1_generated_AccessApproval_UpdateAccessApprovalSettings_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks/main.go index 476cac6ee7a..0dfbb31c40a 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/AuditUserLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_AuditUserLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_AuditUserLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks/main.go index 30ff2d59e5b..4eb88fab1a3 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchCreateUserLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchCreateUserLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchCreateUserLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks/main.go index b2c672f1d25..bbedda6b63d 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchDeleteUserLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchDeleteUserLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchDeleteUserLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks/main.go index 950bf982c6b..531b2f14549 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchGetUserLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchGetUserLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchGetUserLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks/main.go index e578858b9c0..17d4f416efe 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/BatchUpdateUserLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchUpdateUserLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_BatchUpdateUserLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateAndroidAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateAndroidAppDataStream/main.go index 4cb40b9e531..973d66d4842 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateAndroidAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateAndroidAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateAndroidAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAndroidAppDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateAndroidAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAndroidAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateFirebaseLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateFirebaseLink/main.go index 858d6cfee9c..4703aadb087 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateFirebaseLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateFirebaseLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateFirebaseLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateFirebaseLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateFirebaseLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateFirebaseLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateGoogleAdsLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateGoogleAdsLink/main.go index 0c01a96c51c..e4a989b1cf9 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateGoogleAdsLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateGoogleAdsLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateGoogleAdsLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateGoogleAdsLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateGoogleAdsLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateGoogleAdsLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateIosAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateIosAppDataStream/main.go index 455b17f8454..efd03615068 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateIosAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateIosAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateIosAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateIosAppDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateIosAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateIosAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateProperty/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateProperty/main.go index 7c358c98e64..e439775e005 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateProperty/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateProperty/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateProperty] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateProperty_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateProperty] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateProperty_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink/main.go index df5b9399644..e2ccf4683cb 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateUserLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateUserLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateUserLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateWebDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateWebDataStream/main.go index de0a8cfc314..a87f951fadb 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateWebDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/CreateWebDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateWebDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateWebDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_CreateWebDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateWebDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAccount/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAccount/main.go index b19c4265527..f8ca1a4ba52 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAccount/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteAccount] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccount_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteAccount] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccount_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAndroidAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAndroidAppDataStream/main.go index e846ebc31a1..c7f22dde7b4 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAndroidAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteAndroidAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteAndroidAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAndroidAppDataStream_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteAndroidAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAndroidAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteFirebaseLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteFirebaseLink/main.go index 1612a0e7f14..366455cc92c 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteFirebaseLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteFirebaseLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteFirebaseLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteFirebaseLink_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteFirebaseLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteFirebaseLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteGoogleAdsLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteGoogleAdsLink/main.go index 43f7d60fdfe..767ccb0a9f1 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteGoogleAdsLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteGoogleAdsLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteGoogleAdsLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteGoogleAdsLink_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteGoogleAdsLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteGoogleAdsLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteIosAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteIosAppDataStream/main.go index 4f066c798bb..0cb8fa12e6c 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteIosAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteIosAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteIosAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteIosAppDataStream_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteIosAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteIosAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteProperty/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteProperty/main.go index 4afb144a010..11534ae4869 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteProperty/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteProperty/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteProperty] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteProperty_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteProperty] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteProperty_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink/main.go index 475c9704491..abc4c0c7315 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteUserLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteUserLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteUserLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteWebDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteWebDataStream/main.go index 431b1cd5563..56a2323d8de 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteWebDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/DeleteWebDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteWebDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteWebDataStream_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_DeleteWebDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteWebDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAccount/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAccount/main.go index d1e7f8de561..18a5ade9ebf 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAccount/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetAccount] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccount_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetAccount] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccount_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAndroidAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAndroidAppDataStream/main.go index 1f7139a9d43..5fa9328c3bd 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAndroidAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetAndroidAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetAndroidAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAndroidAppDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetAndroidAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAndroidAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetDataSharingSettings/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetDataSharingSettings/main.go index e95fa84d18e..e73a72cfbdf 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetDataSharingSettings/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetDataSharingSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetDataSharingSettings] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataSharingSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetDataSharingSettings] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataSharingSettings_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetEnhancedMeasurementSettings/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetEnhancedMeasurementSettings/main.go index 23ce47b9fbb..d60b728c589 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetEnhancedMeasurementSettings/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetEnhancedMeasurementSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetEnhancedMeasurementSettings] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetEnhancedMeasurementSettings] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetGlobalSiteTag/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetGlobalSiteTag/main.go index 08eea6a7cc7..24db48c0f5d 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetGlobalSiteTag/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetGlobalSiteTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetGlobalSiteTag] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGlobalSiteTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetGlobalSiteTag] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGlobalSiteTag_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetIosAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetIosAppDataStream/main.go index 5adde53b810..f8bf20e9d19 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetIosAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetIosAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetIosAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetIosAppDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetIosAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetIosAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetProperty/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetProperty/main.go index c7e8978cecd..88da2eab7ee 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetProperty/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetProperty/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetProperty] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetProperty_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetProperty] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetProperty_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetUserLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetUserLink/main.go index 3ac4a8765c5..dbc52eb458c 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetUserLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetUserLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetUserLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetUserLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetWebDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetWebDataStream/main.go index fc1f4ab604b..a9b52be30fc 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetWebDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/GetWebDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetWebDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetWebDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_GetWebDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetWebDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccountSummaries/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccountSummaries/main.go index 6fd33127231..db691fe6f12 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccountSummaries/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccountSummaries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListAccountSummaries] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListAccountSummaries] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccounts/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccounts/main.go index a063166d2e1..c3a7a6ff8a5 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccounts/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAccounts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListAccounts] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListAccounts] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAndroidAppDataStreams/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAndroidAppDataStreams/main.go index d61fc43ef1e..7cfef21bd7d 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAndroidAppDataStreams/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListAndroidAppDataStreams/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListAndroidAppDataStreams] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAndroidAppDataStreams_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListAndroidAppDataStreams] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAndroidAppDataStreams_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListFirebaseLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListFirebaseLinks/main.go index 0242f7ccaa0..12a069882db 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListFirebaseLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListFirebaseLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListFirebaseLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListFirebaseLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListGoogleAdsLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListGoogleAdsLinks/main.go index f471a5ac37d..754ad7574de 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListGoogleAdsLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListGoogleAdsLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListGoogleAdsLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListGoogleAdsLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListIosAppDataStreams/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListIosAppDataStreams/main.go index 5aae286a5da..1ad8b35de41 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListIosAppDataStreams/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListIosAppDataStreams/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListIosAppDataStreams] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListIosAppDataStreams_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListIosAppDataStreams] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListIosAppDataStreams_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListProperties/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListProperties/main.go index 33f6e397f33..389ef81589d 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListProperties/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListProperties/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListProperties] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListProperties] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListUserLinks/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListUserLinks/main.go index 3b567d52eec..7213434bc47 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListUserLinks/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListUserLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListUserLinks] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListUserLinks] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListWebDataStreams/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListWebDataStreams/main.go index 1a6238b2a16..9ce447b1e87 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListWebDataStreams/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ListWebDataStreams/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListWebDataStreams] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListWebDataStreams_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ListWebDataStreams] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListWebDataStreams_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/NewAnalyticsAdminClient/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/NewAnalyticsAdminClient/main.go deleted file mode 100644 index 1a5175fed5d..00000000000 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/NewAnalyticsAdminClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_NewAnalyticsAdminClient] - -package main - -import ( - "context" - - admin "cloud.google.com/go/analytics/admin/apiv1alpha" -) - -func main() { - ctx := context.Background() - c, err := admin.NewAnalyticsAdminClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_NewAnalyticsAdminClient] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ProvisionAccountTicket/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ProvisionAccountTicket/main.go index 74b8f9923ab..a8222ad8132 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ProvisionAccountTicket/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/ProvisionAccountTicket/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ProvisionAccountTicket] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ProvisionAccountTicket_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_ProvisionAccountTicket] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ProvisionAccountTicket_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAccount/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAccount/main.go index a9b110c0eca..a79fe8250b3 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAccount/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateAccount] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccount_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateAccount] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccount_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAndroidAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAndroidAppDataStream/main.go index e13b24eafd7..ce235fd862e 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAndroidAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateAndroidAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateAndroidAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAndroidAppDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateAndroidAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAndroidAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateEnhancedMeasurementSettings/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateEnhancedMeasurementSettings/main.go index 58105e4d9c9..dc0302f7a54 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateEnhancedMeasurementSettings/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateEnhancedMeasurementSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateEnhancedMeasurementSettings] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateEnhancedMeasurementSettings] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateFirebaseLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateFirebaseLink/main.go index d9dfe378b8a..a140dabffc0 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateFirebaseLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateFirebaseLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateFirebaseLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateFirebaseLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateFirebaseLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateFirebaseLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateGoogleAdsLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateGoogleAdsLink/main.go index 326475ab1f2..3852b70978b 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateGoogleAdsLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateGoogleAdsLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateGoogleAdsLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleAdsLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateGoogleAdsLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleAdsLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateIosAppDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateIosAppDataStream/main.go index 686b8ed6e2f..e93c5542040 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateIosAppDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateIosAppDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateIosAppDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateIosAppDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateIosAppDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateIosAppDataStream_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateProperty/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateProperty/main.go index 7974bb81927..81f90e50733 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateProperty/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateProperty/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateProperty] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateProperty_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateProperty] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateProperty_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateUserLink/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateUserLink/main.go index bd75df0c33f..40d8e3cf8db 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateUserLink/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateUserLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateUserLink] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateUserLink] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_sync] diff --git a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateWebDataStream/main.go b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateWebDataStream/main.go index d364d1e782e..1690a0e82c8 100644 --- a/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateWebDataStream/main.go +++ b/internal/generated/snippets/analytics/admin/apiv1alpha/AnalyticsAdminClient/UpdateWebDataStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateWebDataStream] +// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateWebDataStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsadmin_generated_analytics_admin_apiv1alpha_AnalyticsAdminClient_UpdateWebDataStream] +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateWebDataStream_sync] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunPivotReports/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunPivotReports/main.go index df7653757a2..6e606460159 100644 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunPivotReports/main.go +++ b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunPivotReports/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_BatchRunPivotReports] +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_BatchRunPivotReports_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_BatchRunPivotReports] +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_BatchRunPivotReports_sync] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunReports/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunReports/main.go index 542ef88b9e8..85ea10f2138 100644 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunReports/main.go +++ b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/BatchRunReports/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_BatchRunReports] +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_BatchRunReports_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_BatchRunReports] +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_BatchRunReports_sync] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/GetMetadata/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/GetMetadata/main.go index 45e3183fd5e..535d44e2487 100644 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/GetMetadata/main.go +++ b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/GetMetadata/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_GetMetadata] +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_GetMetadata] +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_GetMetadata_sync] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/NewAlphaAnalyticsDataClient/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/NewAlphaAnalyticsDataClient/main.go deleted file mode 100644 index 3b4b324cdec..00000000000 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/NewAlphaAnalyticsDataClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START analyticsdata_generated_analytics_data_apiv1alpha_NewAlphaAnalyticsDataClient] - -package main - -import ( - "context" - - data "cloud.google.com/go/analytics/data/apiv1alpha" -) - -func main() { - ctx := context.Background() - c, err := data.NewAlphaAnalyticsDataClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END analyticsdata_generated_analytics_data_apiv1alpha_NewAlphaAnalyticsDataClient] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunPivotReport/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunPivotReport/main.go index 3ddc23e4dd3..3a3d4de2a82 100644 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunPivotReport/main.go +++ b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunPivotReport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_RunPivotReport] +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunPivotReport_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_RunPivotReport] +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunPivotReport_sync] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunRealtimeReport/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunRealtimeReport/main.go index 97e13d76863..84bf26c2e06 100644 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunRealtimeReport/main.go +++ b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunRealtimeReport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_RunRealtimeReport] +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunRealtimeReport_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_RunRealtimeReport] +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunRealtimeReport_sync] diff --git a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunReport/main.go b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunReport/main.go index 1929606ae0d..c8954069737 100644 --- a/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunReport/main.go +++ b/internal/generated/snippets/analytics/data/apiv1alpha/AlphaAnalyticsDataClient/RunReport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_RunReport] +// [START analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END analyticsdata_generated_analytics_data_apiv1alpha_AlphaAnalyticsDataClient_RunReport] +// [END analyticsdata_v1alpha_generated_AlphaAnalyticsData_RunReport_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/CreateApi/main.go b/internal/generated/snippets/apigateway/apiv1/Client/CreateApi/main.go index d1488e01a79..080684469db 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/CreateApi/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/CreateApi/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_CreateApi] +// [START apigateway_v1_generated_ApiGatewayService_CreateApi_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_CreateApi] +// [END apigateway_v1_generated_ApiGatewayService_CreateApi_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/CreateApiConfig/main.go b/internal/generated/snippets/apigateway/apiv1/Client/CreateApiConfig/main.go index 7994249d85a..96784e11d7d 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/CreateApiConfig/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/CreateApiConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_CreateApiConfig] +// [START apigateway_v1_generated_ApiGatewayService_CreateApiConfig_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_CreateApiConfig] +// [END apigateway_v1_generated_ApiGatewayService_CreateApiConfig_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/CreateGateway/main.go b/internal/generated/snippets/apigateway/apiv1/Client/CreateGateway/main.go index dd5b96da166..864ea9f7a03 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/CreateGateway/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/CreateGateway/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_CreateGateway] +// [START apigateway_v1_generated_ApiGatewayService_CreateGateway_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_CreateGateway] +// [END apigateway_v1_generated_ApiGatewayService_CreateGateway_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/DeleteApi/main.go b/internal/generated/snippets/apigateway/apiv1/Client/DeleteApi/main.go index 7a422f06d65..bcdf822c8f0 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/DeleteApi/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/DeleteApi/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_DeleteApi] +// [START apigateway_v1_generated_ApiGatewayService_DeleteApi_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END apigateway_generated_apigateway_apiv1_Client_DeleteApi] +// [END apigateway_v1_generated_ApiGatewayService_DeleteApi_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/DeleteApiConfig/main.go b/internal/generated/snippets/apigateway/apiv1/Client/DeleteApiConfig/main.go index 45774301f77..3e842fd0b58 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/DeleteApiConfig/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/DeleteApiConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_DeleteApiConfig] +// [START apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END apigateway_generated_apigateway_apiv1_Client_DeleteApiConfig] +// [END apigateway_v1_generated_ApiGatewayService_DeleteApiConfig_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/DeleteGateway/main.go b/internal/generated/snippets/apigateway/apiv1/Client/DeleteGateway/main.go index 345de8b6e62..09225e7a993 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/DeleteGateway/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/DeleteGateway/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_DeleteGateway] +// [START apigateway_v1_generated_ApiGatewayService_DeleteGateway_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END apigateway_generated_apigateway_apiv1_Client_DeleteGateway] +// [END apigateway_v1_generated_ApiGatewayService_DeleteGateway_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/GetApi/main.go b/internal/generated/snippets/apigateway/apiv1/Client/GetApi/main.go index 678b32ce1f8..50a3fce3194 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/GetApi/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/GetApi/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_GetApi] +// [START apigateway_v1_generated_ApiGatewayService_GetApi_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_GetApi] +// [END apigateway_v1_generated_ApiGatewayService_GetApi_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/GetApiConfig/main.go b/internal/generated/snippets/apigateway/apiv1/Client/GetApiConfig/main.go index 4b598b0a059..7d29c98e948 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/GetApiConfig/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/GetApiConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_GetApiConfig] +// [START apigateway_v1_generated_ApiGatewayService_GetApiConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_GetApiConfig] +// [END apigateway_v1_generated_ApiGatewayService_GetApiConfig_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/GetGateway/main.go b/internal/generated/snippets/apigateway/apiv1/Client/GetGateway/main.go index 4bb2006101b..de30defb2f0 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/GetGateway/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/GetGateway/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_GetGateway] +// [START apigateway_v1_generated_ApiGatewayService_GetGateway_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_GetGateway] +// [END apigateway_v1_generated_ApiGatewayService_GetGateway_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/ListApiConfigs/main.go b/internal/generated/snippets/apigateway/apiv1/Client/ListApiConfigs/main.go index 8c4e605cbca..217a5c2f85e 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/ListApiConfigs/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/ListApiConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_ListApiConfigs] +// [START apigateway_v1_generated_ApiGatewayService_ListApiConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END apigateway_generated_apigateway_apiv1_Client_ListApiConfigs] +// [END apigateway_v1_generated_ApiGatewayService_ListApiConfigs_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/ListApis/main.go b/internal/generated/snippets/apigateway/apiv1/Client/ListApis/main.go index e5dd41dff89..23de14cb9b1 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/ListApis/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/ListApis/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_ListApis] +// [START apigateway_v1_generated_ApiGatewayService_ListApis_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END apigateway_generated_apigateway_apiv1_Client_ListApis] +// [END apigateway_v1_generated_ApiGatewayService_ListApis_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/ListGateways/main.go b/internal/generated/snippets/apigateway/apiv1/Client/ListGateways/main.go index 850ece291d0..fc5ed723d76 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/ListGateways/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/ListGateways/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_ListGateways] +// [START apigateway_v1_generated_ApiGatewayService_ListGateways_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END apigateway_generated_apigateway_apiv1_Client_ListGateways] +// [END apigateway_v1_generated_ApiGatewayService_ListGateways_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/NewClient/main.go b/internal/generated/snippets/apigateway/apiv1/Client/NewClient/main.go deleted file mode 100644 index 98fa69bba79..00000000000 --- a/internal/generated/snippets/apigateway/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START apigateway_generated_apigateway_apiv1_NewClient] - -package main - -import ( - "context" - - apigateway "cloud.google.com/go/apigateway/apiv1" -) - -func main() { - ctx := context.Background() - c, err := apigateway.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END apigateway_generated_apigateway_apiv1_NewClient] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/UpdateApi/main.go b/internal/generated/snippets/apigateway/apiv1/Client/UpdateApi/main.go index 9e8be163f0b..62fcd941bde 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/UpdateApi/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/UpdateApi/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_UpdateApi] +// [START apigateway_v1_generated_ApiGatewayService_UpdateApi_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_UpdateApi] +// [END apigateway_v1_generated_ApiGatewayService_UpdateApi_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/UpdateApiConfig/main.go b/internal/generated/snippets/apigateway/apiv1/Client/UpdateApiConfig/main.go index 2177270a191..a47d5ae8acd 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/UpdateApiConfig/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/UpdateApiConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_UpdateApiConfig] +// [START apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_UpdateApiConfig] +// [END apigateway_v1_generated_ApiGatewayService_UpdateApiConfig_sync] diff --git a/internal/generated/snippets/apigateway/apiv1/Client/UpdateGateway/main.go b/internal/generated/snippets/apigateway/apiv1/Client/UpdateGateway/main.go index e185baf7352..f2ba8396d44 100644 --- a/internal/generated/snippets/apigateway/apiv1/Client/UpdateGateway/main.go +++ b/internal/generated/snippets/apigateway/apiv1/Client/UpdateGateway/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START apigateway_generated_apigateway_apiv1_Client_UpdateGateway] +// [START apigateway_v1_generated_ApiGatewayService_UpdateGateway_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END apigateway_generated_apigateway_apiv1_Client_UpdateGateway] +// [END apigateway_v1_generated_ApiGatewayService_UpdateGateway_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/CreateApplication/main.go b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/CreateApplication/main.go index 7ec749cde87..8160e2240f4 100644 --- a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/CreateApplication/main.go +++ b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/CreateApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ApplicationsClient_CreateApplication] +// [START appengine_v1_generated_Applications_CreateApplication_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_ApplicationsClient_CreateApplication] +// [END appengine_v1_generated_Applications_CreateApplication_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/GetApplication/main.go b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/GetApplication/main.go index b8295c3fb9a..f7c5c177d1d 100644 --- a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/GetApplication/main.go +++ b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/GetApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ApplicationsClient_GetApplication] +// [START appengine_v1_generated_Applications_GetApplication_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_ApplicationsClient_GetApplication] +// [END appengine_v1_generated_Applications_GetApplication_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/NewApplicationsClient/main.go b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/NewApplicationsClient/main.go deleted file mode 100644 index 80c42c158e3..00000000000 --- a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/NewApplicationsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewApplicationsClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewApplicationsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewApplicationsClient] diff --git a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/RepairApplication/main.go b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/RepairApplication/main.go index ab8f315390f..4e5c66305d2 100644 --- a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/RepairApplication/main.go +++ b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/RepairApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ApplicationsClient_RepairApplication] +// [START appengine_v1_generated_Applications_RepairApplication_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_ApplicationsClient_RepairApplication] +// [END appengine_v1_generated_Applications_RepairApplication_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/UpdateApplication/main.go b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/UpdateApplication/main.go index 0c366240a89..40cea204966 100644 --- a/internal/generated/snippets/appengine/apiv1/ApplicationsClient/UpdateApplication/main.go +++ b/internal/generated/snippets/appengine/apiv1/ApplicationsClient/UpdateApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ApplicationsClient_UpdateApplication] +// [START appengine_v1_generated_Applications_UpdateApplication_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_ApplicationsClient_UpdateApplication] +// [END appengine_v1_generated_Applications_UpdateApplication_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/CreateAuthorizedCertificate/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/CreateAuthorizedCertificate/main.go index 52edee4e1f2..c0fb4be7757 100644 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/CreateAuthorizedCertificate/main.go +++ b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/CreateAuthorizedCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_CreateAuthorizedCertificate] +// [START appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_CreateAuthorizedCertificate] +// [END appengine_v1_generated_AuthorizedCertificates_CreateAuthorizedCertificate_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/DeleteAuthorizedCertificate/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/DeleteAuthorizedCertificate/main.go index b0ea2489864..17a44bbc568 100644 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/DeleteAuthorizedCertificate/main.go +++ b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/DeleteAuthorizedCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_DeleteAuthorizedCertificate] +// [START appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_DeleteAuthorizedCertificate] +// [END appengine_v1_generated_AuthorizedCertificates_DeleteAuthorizedCertificate_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/GetAuthorizedCertificate/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/GetAuthorizedCertificate/main.go index 061a6db3bf6..7d13cf33c4b 100644 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/GetAuthorizedCertificate/main.go +++ b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/GetAuthorizedCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_GetAuthorizedCertificate] +// [START appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_GetAuthorizedCertificate] +// [END appengine_v1_generated_AuthorizedCertificates_GetAuthorizedCertificate_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/ListAuthorizedCertificates/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/ListAuthorizedCertificates/main.go index fe4c014bee0..56427b5a675 100644 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/ListAuthorizedCertificates/main.go +++ b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/ListAuthorizedCertificates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_ListAuthorizedCertificates] +// [START appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_ListAuthorizedCertificates] +// [END appengine_v1_generated_AuthorizedCertificates_ListAuthorizedCertificates_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/NewAuthorizedCertificatesClient/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/NewAuthorizedCertificatesClient/main.go deleted file mode 100644 index 6eec52c65d3..00000000000 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/NewAuthorizedCertificatesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewAuthorizedCertificatesClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewAuthorizedCertificatesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewAuthorizedCertificatesClient] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/UpdateAuthorizedCertificate/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/UpdateAuthorizedCertificate/main.go index 9ab41c8312c..dc641a5eed8 100644 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/UpdateAuthorizedCertificate/main.go +++ b/internal/generated/snippets/appengine/apiv1/AuthorizedCertificatesClient/UpdateAuthorizedCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_UpdateAuthorizedCertificate] +// [START appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_AuthorizedCertificatesClient_UpdateAuthorizedCertificate] +// [END appengine_v1_generated_AuthorizedCertificates_UpdateAuthorizedCertificate_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/ListAuthorizedDomains/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/ListAuthorizedDomains/main.go index 925f042d638..c6e1f8253a8 100644 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/ListAuthorizedDomains/main.go +++ b/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/ListAuthorizedDomains/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_AuthorizedDomainsClient_ListAuthorizedDomains] +// [START appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_AuthorizedDomainsClient_ListAuthorizedDomains] +// [END appengine_v1_generated_AuthorizedDomains_ListAuthorizedDomains_sync] diff --git a/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/NewAuthorizedDomainsClient/main.go b/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/NewAuthorizedDomainsClient/main.go deleted file mode 100644 index 253531e45c8..00000000000 --- a/internal/generated/snippets/appengine/apiv1/AuthorizedDomainsClient/NewAuthorizedDomainsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewAuthorizedDomainsClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewAuthorizedDomainsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewAuthorizedDomainsClient] diff --git a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/CreateDomainMapping/main.go b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/CreateDomainMapping/main.go index cd449bc36fb..101dce45b2f 100644 --- a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/CreateDomainMapping/main.go +++ b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/CreateDomainMapping/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_DomainMappingsClient_CreateDomainMapping] +// [START appengine_v1_generated_DomainMappings_CreateDomainMapping_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_DomainMappingsClient_CreateDomainMapping] +// [END appengine_v1_generated_DomainMappings_CreateDomainMapping_sync] diff --git a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/DeleteDomainMapping/main.go b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/DeleteDomainMapping/main.go index 741da663906..74d7d7b4f0f 100644 --- a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/DeleteDomainMapping/main.go +++ b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/DeleteDomainMapping/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_DomainMappingsClient_DeleteDomainMapping] +// [START appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_DomainMappingsClient_DeleteDomainMapping] +// [END appengine_v1_generated_DomainMappings_DeleteDomainMapping_sync] diff --git a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/GetDomainMapping/main.go b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/GetDomainMapping/main.go index 1f323fe19f0..ab0156fa9e1 100644 --- a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/GetDomainMapping/main.go +++ b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/GetDomainMapping/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_DomainMappingsClient_GetDomainMapping] +// [START appengine_v1_generated_DomainMappings_GetDomainMapping_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_DomainMappingsClient_GetDomainMapping] +// [END appengine_v1_generated_DomainMappings_GetDomainMapping_sync] diff --git a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/ListDomainMappings/main.go b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/ListDomainMappings/main.go index 6c1b2e8a7b0..85d7ffec7a4 100644 --- a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/ListDomainMappings/main.go +++ b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/ListDomainMappings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_DomainMappingsClient_ListDomainMappings] +// [START appengine_v1_generated_DomainMappings_ListDomainMappings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_DomainMappingsClient_ListDomainMappings] +// [END appengine_v1_generated_DomainMappings_ListDomainMappings_sync] diff --git a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/NewDomainMappingsClient/main.go b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/NewDomainMappingsClient/main.go deleted file mode 100644 index 1a5cac543d4..00000000000 --- a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/NewDomainMappingsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewDomainMappingsClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewDomainMappingsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewDomainMappingsClient] diff --git a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/UpdateDomainMapping/main.go b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/UpdateDomainMapping/main.go index 35b825f2563..5a645f9ab0a 100644 --- a/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/UpdateDomainMapping/main.go +++ b/internal/generated/snippets/appengine/apiv1/DomainMappingsClient/UpdateDomainMapping/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_DomainMappingsClient_UpdateDomainMapping] +// [START appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_DomainMappingsClient_UpdateDomainMapping] +// [END appengine_v1_generated_DomainMappings_UpdateDomainMapping_sync] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/BatchUpdateIngressRules/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/BatchUpdateIngressRules/main.go index 985f856221c..fcef3ff65cc 100644 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/BatchUpdateIngressRules/main.go +++ b/internal/generated/snippets/appengine/apiv1/FirewallClient/BatchUpdateIngressRules/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_FirewallClient_BatchUpdateIngressRules] +// [START appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_FirewallClient_BatchUpdateIngressRules] +// [END appengine_v1_generated_Firewall_BatchUpdateIngressRules_sync] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/CreateIngressRule/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/CreateIngressRule/main.go index e4c9ba45ec8..7f0e6bd1b75 100644 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/CreateIngressRule/main.go +++ b/internal/generated/snippets/appengine/apiv1/FirewallClient/CreateIngressRule/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_FirewallClient_CreateIngressRule] +// [START appengine_v1_generated_Firewall_CreateIngressRule_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_FirewallClient_CreateIngressRule] +// [END appengine_v1_generated_Firewall_CreateIngressRule_sync] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/DeleteIngressRule/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/DeleteIngressRule/main.go index 43c2eed7424..acf11621a35 100644 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/DeleteIngressRule/main.go +++ b/internal/generated/snippets/appengine/apiv1/FirewallClient/DeleteIngressRule/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_FirewallClient_DeleteIngressRule] +// [START appengine_v1_generated_Firewall_DeleteIngressRule_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_FirewallClient_DeleteIngressRule] +// [END appengine_v1_generated_Firewall_DeleteIngressRule_sync] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/GetIngressRule/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/GetIngressRule/main.go index 838e03a6977..8bb987a2f71 100644 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/GetIngressRule/main.go +++ b/internal/generated/snippets/appengine/apiv1/FirewallClient/GetIngressRule/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_FirewallClient_GetIngressRule] +// [START appengine_v1_generated_Firewall_GetIngressRule_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_FirewallClient_GetIngressRule] +// [END appengine_v1_generated_Firewall_GetIngressRule_sync] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/ListIngressRules/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/ListIngressRules/main.go index 49e83dc121a..d1010773111 100644 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/ListIngressRules/main.go +++ b/internal/generated/snippets/appengine/apiv1/FirewallClient/ListIngressRules/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_FirewallClient_ListIngressRules] +// [START appengine_v1_generated_Firewall_ListIngressRules_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_FirewallClient_ListIngressRules] +// [END appengine_v1_generated_Firewall_ListIngressRules_sync] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/NewFirewallClient/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/NewFirewallClient/main.go deleted file mode 100644 index 8f77b6bc396..00000000000 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/NewFirewallClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewFirewallClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewFirewallClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewFirewallClient] diff --git a/internal/generated/snippets/appengine/apiv1/FirewallClient/UpdateIngressRule/main.go b/internal/generated/snippets/appengine/apiv1/FirewallClient/UpdateIngressRule/main.go index 760f0601f80..f1e08d8f37a 100644 --- a/internal/generated/snippets/appengine/apiv1/FirewallClient/UpdateIngressRule/main.go +++ b/internal/generated/snippets/appengine/apiv1/FirewallClient/UpdateIngressRule/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_FirewallClient_UpdateIngressRule] +// [START appengine_v1_generated_Firewall_UpdateIngressRule_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_FirewallClient_UpdateIngressRule] +// [END appengine_v1_generated_Firewall_UpdateIngressRule_sync] diff --git a/internal/generated/snippets/appengine/apiv1/InstancesClient/DebugInstance/main.go b/internal/generated/snippets/appengine/apiv1/InstancesClient/DebugInstance/main.go index 3a1f4b3ed54..d96a2f2d200 100644 --- a/internal/generated/snippets/appengine/apiv1/InstancesClient/DebugInstance/main.go +++ b/internal/generated/snippets/appengine/apiv1/InstancesClient/DebugInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_InstancesClient_DebugInstance] +// [START appengine_v1_generated_Instances_DebugInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_InstancesClient_DebugInstance] +// [END appengine_v1_generated_Instances_DebugInstance_sync] diff --git a/internal/generated/snippets/appengine/apiv1/InstancesClient/DeleteInstance/main.go b/internal/generated/snippets/appengine/apiv1/InstancesClient/DeleteInstance/main.go index ae16b2f4c7b..1384152b406 100644 --- a/internal/generated/snippets/appengine/apiv1/InstancesClient/DeleteInstance/main.go +++ b/internal/generated/snippets/appengine/apiv1/InstancesClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_InstancesClient_DeleteInstance] +// [START appengine_v1_generated_Instances_DeleteInstance_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_InstancesClient_DeleteInstance] +// [END appengine_v1_generated_Instances_DeleteInstance_sync] diff --git a/internal/generated/snippets/appengine/apiv1/InstancesClient/GetInstance/main.go b/internal/generated/snippets/appengine/apiv1/InstancesClient/GetInstance/main.go index 51639f46a33..789c30b81df 100644 --- a/internal/generated/snippets/appengine/apiv1/InstancesClient/GetInstance/main.go +++ b/internal/generated/snippets/appengine/apiv1/InstancesClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_InstancesClient_GetInstance] +// [START appengine_v1_generated_Instances_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_InstancesClient_GetInstance] +// [END appengine_v1_generated_Instances_GetInstance_sync] diff --git a/internal/generated/snippets/appengine/apiv1/InstancesClient/ListInstances/main.go b/internal/generated/snippets/appengine/apiv1/InstancesClient/ListInstances/main.go index 314d67635bf..564af05b91c 100644 --- a/internal/generated/snippets/appengine/apiv1/InstancesClient/ListInstances/main.go +++ b/internal/generated/snippets/appengine/apiv1/InstancesClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_InstancesClient_ListInstances] +// [START appengine_v1_generated_Instances_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_InstancesClient_ListInstances] +// [END appengine_v1_generated_Instances_ListInstances_sync] diff --git a/internal/generated/snippets/appengine/apiv1/InstancesClient/NewInstancesClient/main.go b/internal/generated/snippets/appengine/apiv1/InstancesClient/NewInstancesClient/main.go deleted file mode 100644 index 3d29e7cc93a..00000000000 --- a/internal/generated/snippets/appengine/apiv1/InstancesClient/NewInstancesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewInstancesClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewInstancesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewInstancesClient] diff --git a/internal/generated/snippets/appengine/apiv1/ServicesClient/DeleteService/main.go b/internal/generated/snippets/appengine/apiv1/ServicesClient/DeleteService/main.go index f9616075ff2..cb25fffb6df 100644 --- a/internal/generated/snippets/appengine/apiv1/ServicesClient/DeleteService/main.go +++ b/internal/generated/snippets/appengine/apiv1/ServicesClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ServicesClient_DeleteService] +// [START appengine_v1_generated_Services_DeleteService_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_ServicesClient_DeleteService] +// [END appengine_v1_generated_Services_DeleteService_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ServicesClient/GetService/main.go b/internal/generated/snippets/appengine/apiv1/ServicesClient/GetService/main.go index 72063118b05..8aab7bc5407 100644 --- a/internal/generated/snippets/appengine/apiv1/ServicesClient/GetService/main.go +++ b/internal/generated/snippets/appengine/apiv1/ServicesClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ServicesClient_GetService] +// [START appengine_v1_generated_Services_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_ServicesClient_GetService] +// [END appengine_v1_generated_Services_GetService_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ServicesClient/ListServices/main.go b/internal/generated/snippets/appengine/apiv1/ServicesClient/ListServices/main.go index bc7644b465e..4a97a61ad4b 100644 --- a/internal/generated/snippets/appengine/apiv1/ServicesClient/ListServices/main.go +++ b/internal/generated/snippets/appengine/apiv1/ServicesClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ServicesClient_ListServices] +// [START appengine_v1_generated_Services_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_ServicesClient_ListServices] +// [END appengine_v1_generated_Services_ListServices_sync] diff --git a/internal/generated/snippets/appengine/apiv1/ServicesClient/NewServicesClient/main.go b/internal/generated/snippets/appengine/apiv1/ServicesClient/NewServicesClient/main.go deleted file mode 100644 index 686424ef4ae..00000000000 --- a/internal/generated/snippets/appengine/apiv1/ServicesClient/NewServicesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewServicesClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewServicesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewServicesClient] diff --git a/internal/generated/snippets/appengine/apiv1/ServicesClient/UpdateService/main.go b/internal/generated/snippets/appengine/apiv1/ServicesClient/UpdateService/main.go index ed3efde974f..9f60ffef273 100644 --- a/internal/generated/snippets/appengine/apiv1/ServicesClient/UpdateService/main.go +++ b/internal/generated/snippets/appengine/apiv1/ServicesClient/UpdateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_ServicesClient_UpdateService] +// [START appengine_v1_generated_Services_UpdateService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_ServicesClient_UpdateService] +// [END appengine_v1_generated_Services_UpdateService_sync] diff --git a/internal/generated/snippets/appengine/apiv1/VersionsClient/CreateVersion/main.go b/internal/generated/snippets/appengine/apiv1/VersionsClient/CreateVersion/main.go index b1ecf629097..dcc4759010b 100644 --- a/internal/generated/snippets/appengine/apiv1/VersionsClient/CreateVersion/main.go +++ b/internal/generated/snippets/appengine/apiv1/VersionsClient/CreateVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_VersionsClient_CreateVersion] +// [START appengine_v1_generated_Versions_CreateVersion_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_VersionsClient_CreateVersion] +// [END appengine_v1_generated_Versions_CreateVersion_sync] diff --git a/internal/generated/snippets/appengine/apiv1/VersionsClient/DeleteVersion/main.go b/internal/generated/snippets/appengine/apiv1/VersionsClient/DeleteVersion/main.go index 0785cb83caa..d1eb55a24a2 100644 --- a/internal/generated/snippets/appengine/apiv1/VersionsClient/DeleteVersion/main.go +++ b/internal/generated/snippets/appengine/apiv1/VersionsClient/DeleteVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_VersionsClient_DeleteVersion] +// [START appengine_v1_generated_Versions_DeleteVersion_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_VersionsClient_DeleteVersion] +// [END appengine_v1_generated_Versions_DeleteVersion_sync] diff --git a/internal/generated/snippets/appengine/apiv1/VersionsClient/GetVersion/main.go b/internal/generated/snippets/appengine/apiv1/VersionsClient/GetVersion/main.go index 6187941e6f0..f9564703133 100644 --- a/internal/generated/snippets/appengine/apiv1/VersionsClient/GetVersion/main.go +++ b/internal/generated/snippets/appengine/apiv1/VersionsClient/GetVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_VersionsClient_GetVersion] +// [START appengine_v1_generated_Versions_GetVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_VersionsClient_GetVersion] +// [END appengine_v1_generated_Versions_GetVersion_sync] diff --git a/internal/generated/snippets/appengine/apiv1/VersionsClient/ListVersions/main.go b/internal/generated/snippets/appengine/apiv1/VersionsClient/ListVersions/main.go index 9f7cff81719..7240821b0b4 100644 --- a/internal/generated/snippets/appengine/apiv1/VersionsClient/ListVersions/main.go +++ b/internal/generated/snippets/appengine/apiv1/VersionsClient/ListVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_VersionsClient_ListVersions] +// [START appengine_v1_generated_Versions_ListVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END appengine_generated_appengine_apiv1_VersionsClient_ListVersions] +// [END appengine_v1_generated_Versions_ListVersions_sync] diff --git a/internal/generated/snippets/appengine/apiv1/VersionsClient/NewVersionsClient/main.go b/internal/generated/snippets/appengine/apiv1/VersionsClient/NewVersionsClient/main.go deleted file mode 100644 index 453f203b969..00000000000 --- a/internal/generated/snippets/appengine/apiv1/VersionsClient/NewVersionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START appengine_generated_appengine_apiv1_NewVersionsClient] - -package main - -import ( - "context" - - appengine "cloud.google.com/go/appengine/apiv1" -) - -func main() { - ctx := context.Background() - c, err := appengine.NewVersionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END appengine_generated_appengine_apiv1_NewVersionsClient] diff --git a/internal/generated/snippets/appengine/apiv1/VersionsClient/UpdateVersion/main.go b/internal/generated/snippets/appengine/apiv1/VersionsClient/UpdateVersion/main.go index 2a1477fb331..b3bfd97bde8 100644 --- a/internal/generated/snippets/appengine/apiv1/VersionsClient/UpdateVersion/main.go +++ b/internal/generated/snippets/appengine/apiv1/VersionsClient/UpdateVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START appengine_generated_appengine_apiv1_VersionsClient_UpdateVersion] +// [START appengine_v1_generated_Versions_UpdateVersion_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END appengine_generated_appengine_apiv1_VersionsClient_UpdateVersion] +// [END appengine_v1_generated_Versions_UpdateVersion_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchCreateRows/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchCreateRows/main.go index 2006f78dfff..abfab3b85af 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchCreateRows/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchCreateRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_BatchCreateRows] +// [START area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_BatchCreateRows] +// [END area120tables_v1alpha1_generated_TablesService_BatchCreateRows_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchDeleteRows/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchDeleteRows/main.go index 659fd68fe52..03b8622ebe6 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchDeleteRows/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchDeleteRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_BatchDeleteRows] +// [START area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_BatchDeleteRows] +// [END area120tables_v1alpha1_generated_TablesService_BatchDeleteRows_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchUpdateRows/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchUpdateRows/main.go index 9fa23cbe1f4..70c6a7e72e9 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchUpdateRows/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/BatchUpdateRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_BatchUpdateRows] +// [START area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_BatchUpdateRows] +// [END area120tables_v1alpha1_generated_TablesService_BatchUpdateRows_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/CreateRow/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/CreateRow/main.go index bbef2b7eaaa..e0652dcb5d1 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/CreateRow/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/CreateRow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_CreateRow] +// [START area120tables_v1alpha1_generated_TablesService_CreateRow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_CreateRow] +// [END area120tables_v1alpha1_generated_TablesService_CreateRow_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/DeleteRow/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/DeleteRow/main.go index cc8e23ec1a5..23a4bf956c1 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/DeleteRow/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/DeleteRow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_DeleteRow] +// [START area120tables_v1alpha1_generated_TablesService_DeleteRow_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_DeleteRow] +// [END area120tables_v1alpha1_generated_TablesService_DeleteRow_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetRow/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetRow/main.go index 83df0346f53..92eb875c5b2 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetRow/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetRow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_GetRow] +// [START area120tables_v1alpha1_generated_TablesService_GetRow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_GetRow] +// [END area120tables_v1alpha1_generated_TablesService_GetRow_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetTable/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetTable/main.go index 01ba44455c2..f2a2e26c50f 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetTable/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetTable/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_GetTable] +// [START area120tables_v1alpha1_generated_TablesService_GetTable_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_GetTable] +// [END area120tables_v1alpha1_generated_TablesService_GetTable_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetWorkspace/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetWorkspace/main.go index 533bcddacf5..cdfa0d49554 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetWorkspace/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/GetWorkspace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_GetWorkspace] +// [START area120tables_v1alpha1_generated_TablesService_GetWorkspace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_GetWorkspace] +// [END area120tables_v1alpha1_generated_TablesService_GetWorkspace_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListRows/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListRows/main.go index 868b4cc3cf6..d8f76834914 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListRows/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_ListRows] +// [START area120tables_v1alpha1_generated_TablesService_ListRows_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_ListRows] +// [END area120tables_v1alpha1_generated_TablesService_ListRows_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListTables/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListTables/main.go index e065d42c6fc..45e24f0ff14 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListTables/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListTables/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_ListTables] +// [START area120tables_v1alpha1_generated_TablesService_ListTables_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_ListTables] +// [END area120tables_v1alpha1_generated_TablesService_ListTables_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListWorkspaces/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListWorkspaces/main.go index b556dbc43cb..68a974f722f 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListWorkspaces/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/ListWorkspaces/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_ListWorkspaces] +// [START area120tables_v1alpha1_generated_TablesService_ListWorkspaces_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_ListWorkspaces] +// [END area120tables_v1alpha1_generated_TablesService_ListWorkspaces_sync] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/NewClient/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/NewClient/main.go deleted file mode 100644 index 46fd05eb4fa..00000000000 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START area120tables_generated_area120_tables_apiv1alpha1_NewClient] - -package main - -import ( - "context" - - tables "cloud.google.com/go/area120/tables/apiv1alpha1" -) - -func main() { - ctx := context.Background() - c, err := tables.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END area120tables_generated_area120_tables_apiv1alpha1_NewClient] diff --git a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/UpdateRow/main.go b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/UpdateRow/main.go index 081587b16b5..f543aced256 100644 --- a/internal/generated/snippets/area120/tables/apiv1alpha1/Client/UpdateRow/main.go +++ b/internal/generated/snippets/area120/tables/apiv1alpha1/Client/UpdateRow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START area120tables_generated_area120_tables_apiv1alpha1_Client_UpdateRow] +// [START area120tables_v1alpha1_generated_TablesService_UpdateRow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END area120tables_generated_area120_tables_apiv1alpha1_Client_UpdateRow] +// [END area120tables_v1alpha1_generated_TablesService_UpdateRow_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateRepository/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateRepository/main.go index a9908c73f84..64a8c67631c 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateRepository/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateRepository/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_CreateRepository] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_CreateRepository] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateRepository_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateTag/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateTag/main.go index 76c5b363864..b84738f18df 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateTag/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/CreateTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_CreateTag] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_CreateTag] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_CreateTag_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeletePackage/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeletePackage/main.go index 901ed26054f..da31ea8b0c4 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeletePackage/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeletePackage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeletePackage] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeletePackage] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeletePackage_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteRepository/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteRepository/main.go index 355b663d752..621a207f02e 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteRepository/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteRepository/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeleteRepository] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeleteRepository] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteRepository_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteTag/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteTag/main.go index adad025bada..09bb1c3dace 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteTag/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeleteTag] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeleteTag] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteTag_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteVersion/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteVersion/main.go index c520d5cdc1a..713e97186aa 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteVersion/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/DeleteVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeleteVersion] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_DeleteVersion] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_DeleteVersion_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetFile/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetFile/main.go index eb83220bb55..ec4ed52d136 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetFile/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetFile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetFile] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetFile] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetFile_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetIamPolicy/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetIamPolicy/main.go index 76572176845..27acdd9aa38 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetIamPolicy] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetIamPolicy] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetIamPolicy_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetPackage/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetPackage/main.go index 25d3447f314..8951a8b00dd 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetPackage/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetPackage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetPackage] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetPackage] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetPackage_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetRepository/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetRepository/main.go index 81f5a732b9d..c49f7066633 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetRepository/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetRepository/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetRepository] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetRepository] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetRepository_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetTag/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetTag/main.go index c3e3b94c8f2..7ddeb06fb3c 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetTag/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetTag] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetTag] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetTag_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetVersion/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetVersion/main.go index 151fbefb917..d85f6ed782d 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetVersion/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetVersion] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_GetVersion] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetVersion_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListFiles/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListFiles/main.go index 9abc2d8b12e..6ef020909f3 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListFiles/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListFiles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListFiles] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListFiles] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListFiles_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListPackages/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListPackages/main.go index a055131e03d..dd826dcd9b7 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListPackages/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListPackages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListPackages] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListPackages] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListPackages_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListRepositories/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListRepositories/main.go index d41f25a608a..a0dca71c6b9 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListRepositories/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListRepositories/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListRepositories] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListRepositories] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListRepositories_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListTags/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListTags/main.go index ba2df6cc110..0ae334b56b7 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListTags/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListTags/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListTags] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListTags] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListTags_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListVersions/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListVersions/main.go index 4cad25e0eae..309d5e9eadc 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListVersions/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ListVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListVersions] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_ListVersions] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ListVersions_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/NewClient/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/NewClient/main.go deleted file mode 100644 index 17de31354d5..00000000000 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START artifactregistry_generated_artifactregistry_apiv1beta2_NewClient] - -package main - -import ( - "context" - - artifactregistry "cloud.google.com/go/artifactregistry/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := artifactregistry.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END artifactregistry_generated_artifactregistry_apiv1beta2_NewClient] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/SetIamPolicy/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/SetIamPolicy/main.go index 8dc7694c314..b2f01105fa5 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_SetIamPolicy] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_SetIamPolicy] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_SetIamPolicy_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/TestIamPermissions/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/TestIamPermissions/main.go index 56e3dabc7ab..9110afa0969 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_TestIamPermissions] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_TestIamPermissions] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_TestIamPermissions_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateRepository/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateRepository/main.go index e2a725c4fa3..3a0acb37dd4 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateRepository/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateRepository/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_UpdateRepository] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_UpdateRepository] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateRepository_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateTag/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateTag/main.go index cea749ebea6..0c6b1953bdb 100644 --- a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateTag/main.go +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START artifactregistry_generated_artifactregistry_apiv1beta2_Client_UpdateTag] +// [START artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END artifactregistry_generated_artifactregistry_apiv1beta2_Client_UpdateTag] +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateTag_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicy/main.go b/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicy/main.go index ee77a6275d7..f6a2caaa164 100644 --- a/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicy/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_AnalyzeIamPolicy] +// [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_AnalyzeIamPolicy] +// [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicyLongrunning/main.go b/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicyLongrunning/main.go index 2c0bc504d9a..9d5868c88a7 100644 --- a/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicyLongrunning/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/AnalyzeIamPolicyLongrunning/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_AnalyzeIamPolicyLongrunning] +// [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_AnalyzeIamPolicyLongrunning] +// [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/BatchGetAssetsHistory/main.go b/internal/generated/snippets/asset/apiv1/Client/BatchGetAssetsHistory/main.go index 46f3d9de0b9..cfd80a2e10e 100644 --- a/internal/generated/snippets/asset/apiv1/Client/BatchGetAssetsHistory/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/BatchGetAssetsHistory/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_BatchGetAssetsHistory] +// [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_BatchGetAssetsHistory] +// [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/CreateFeed/main.go b/internal/generated/snippets/asset/apiv1/Client/CreateFeed/main.go index 4eb4cacfb35..69d19093a62 100644 --- a/internal/generated/snippets/asset/apiv1/Client/CreateFeed/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/CreateFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_CreateFeed] +// [START cloudasset_v1_generated_AssetService_CreateFeed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_CreateFeed] +// [END cloudasset_v1_generated_AssetService_CreateFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/DeleteFeed/main.go b/internal/generated/snippets/asset/apiv1/Client/DeleteFeed/main.go index 652e532b97c..f93f72c5175 100644 --- a/internal/generated/snippets/asset/apiv1/Client/DeleteFeed/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/DeleteFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_DeleteFeed] +// [START cloudasset_v1_generated_AssetService_DeleteFeed_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudasset_generated_asset_apiv1_Client_DeleteFeed] +// [END cloudasset_v1_generated_AssetService_DeleteFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/ExportAssets/main.go b/internal/generated/snippets/asset/apiv1/Client/ExportAssets/main.go index 17a4dcbfff7..66ac2cda9df 100644 --- a/internal/generated/snippets/asset/apiv1/Client/ExportAssets/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/ExportAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_ExportAssets] +// [START cloudasset_v1_generated_AssetService_ExportAssets_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_ExportAssets] +// [END cloudasset_v1_generated_AssetService_ExportAssets_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/GetFeed/main.go b/internal/generated/snippets/asset/apiv1/Client/GetFeed/main.go index 42dec170c51..fcc299bbcc9 100644 --- a/internal/generated/snippets/asset/apiv1/Client/GetFeed/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/GetFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_GetFeed] +// [START cloudasset_v1_generated_AssetService_GetFeed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_GetFeed] +// [END cloudasset_v1_generated_AssetService_GetFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/ListFeeds/main.go b/internal/generated/snippets/asset/apiv1/Client/ListFeeds/main.go index 66ff2b9a3d4..6b7d959d54a 100644 --- a/internal/generated/snippets/asset/apiv1/Client/ListFeeds/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/ListFeeds/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_ListFeeds] +// [START cloudasset_v1_generated_AssetService_ListFeeds_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_ListFeeds] +// [END cloudasset_v1_generated_AssetService_ListFeeds_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/NewClient/main.go b/internal/generated/snippets/asset/apiv1/Client/NewClient/main.go deleted file mode 100644 index 8c551fa5909..00000000000 --- a/internal/generated/snippets/asset/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudasset_generated_asset_apiv1_NewClient] - -package main - -import ( - "context" - - asset "cloud.google.com/go/asset/apiv1" -) - -func main() { - ctx := context.Background() - c, err := asset.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudasset_generated_asset_apiv1_NewClient] diff --git a/internal/generated/snippets/asset/apiv1/Client/SearchAllIamPolicies/main.go b/internal/generated/snippets/asset/apiv1/Client/SearchAllIamPolicies/main.go index ebb7375ba53..b4c57a5d773 100644 --- a/internal/generated/snippets/asset/apiv1/Client/SearchAllIamPolicies/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/SearchAllIamPolicies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_SearchAllIamPolicies] +// [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudasset_generated_asset_apiv1_Client_SearchAllIamPolicies] +// [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/SearchAllResources/main.go b/internal/generated/snippets/asset/apiv1/Client/SearchAllResources/main.go index 70fcc9fc3bd..22392285b69 100644 --- a/internal/generated/snippets/asset/apiv1/Client/SearchAllResources/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/SearchAllResources/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_SearchAllResources] +// [START cloudasset_v1_generated_AssetService_SearchAllResources_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudasset_generated_asset_apiv1_Client_SearchAllResources] +// [END cloudasset_v1_generated_AssetService_SearchAllResources_sync] diff --git a/internal/generated/snippets/asset/apiv1/Client/UpdateFeed/main.go b/internal/generated/snippets/asset/apiv1/Client/UpdateFeed/main.go index 64c2880511c..869c02aafd1 100644 --- a/internal/generated/snippets/asset/apiv1/Client/UpdateFeed/main.go +++ b/internal/generated/snippets/asset/apiv1/Client/UpdateFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1_Client_UpdateFeed] +// [START cloudasset_v1_generated_AssetService_UpdateFeed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1_Client_UpdateFeed] +// [END cloudasset_v1_generated_AssetService_UpdateFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1p2beta1/Client/CreateFeed/main.go b/internal/generated/snippets/asset/apiv1p2beta1/Client/CreateFeed/main.go index f3d646a1fe6..b6a504f483c 100644 --- a/internal/generated/snippets/asset/apiv1p2beta1/Client/CreateFeed/main.go +++ b/internal/generated/snippets/asset/apiv1p2beta1/Client/CreateFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1p2beta1_Client_CreateFeed] +// [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1p2beta1_Client_CreateFeed] +// [END cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1p2beta1/Client/DeleteFeed/main.go b/internal/generated/snippets/asset/apiv1p2beta1/Client/DeleteFeed/main.go index f3a9c9b4576..04d14e16279 100644 --- a/internal/generated/snippets/asset/apiv1p2beta1/Client/DeleteFeed/main.go +++ b/internal/generated/snippets/asset/apiv1p2beta1/Client/DeleteFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1p2beta1_Client_DeleteFeed] +// [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudasset_generated_asset_apiv1p2beta1_Client_DeleteFeed] +// [END cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1p2beta1/Client/GetFeed/main.go b/internal/generated/snippets/asset/apiv1p2beta1/Client/GetFeed/main.go index 746a011f7bc..1a22853fbd9 100644 --- a/internal/generated/snippets/asset/apiv1p2beta1/Client/GetFeed/main.go +++ b/internal/generated/snippets/asset/apiv1p2beta1/Client/GetFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1p2beta1_Client_GetFeed] +// [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1p2beta1_Client_GetFeed] +// [END cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1p2beta1/Client/ListFeeds/main.go b/internal/generated/snippets/asset/apiv1p2beta1/Client/ListFeeds/main.go index a70f9b61686..d33428ba5fb 100644 --- a/internal/generated/snippets/asset/apiv1p2beta1/Client/ListFeeds/main.go +++ b/internal/generated/snippets/asset/apiv1p2beta1/Client/ListFeeds/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1p2beta1_Client_ListFeeds] +// [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1p2beta1_Client_ListFeeds] +// [END cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] diff --git a/internal/generated/snippets/asset/apiv1p2beta1/Client/NewClient/main.go b/internal/generated/snippets/asset/apiv1p2beta1/Client/NewClient/main.go deleted file mode 100644 index fe910e32042..00000000000 --- a/internal/generated/snippets/asset/apiv1p2beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudasset_generated_asset_apiv1p2beta1_NewClient] - -package main - -import ( - "context" - - asset "cloud.google.com/go/asset/apiv1p2beta1" -) - -func main() { - ctx := context.Background() - c, err := asset.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudasset_generated_asset_apiv1p2beta1_NewClient] diff --git a/internal/generated/snippets/asset/apiv1p2beta1/Client/UpdateFeed/main.go b/internal/generated/snippets/asset/apiv1p2beta1/Client/UpdateFeed/main.go index 1036340274d..281b749c23e 100644 --- a/internal/generated/snippets/asset/apiv1p2beta1/Client/UpdateFeed/main.go +++ b/internal/generated/snippets/asset/apiv1p2beta1/Client/UpdateFeed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1p2beta1_Client_UpdateFeed] +// [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudasset_generated_asset_apiv1p2beta1_Client_UpdateFeed] +// [END cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] diff --git a/internal/generated/snippets/asset/apiv1p5beta1/Client/ListAssets/main.go b/internal/generated/snippets/asset/apiv1p5beta1/Client/ListAssets/main.go index cad60444720..181e68b7af2 100644 --- a/internal/generated/snippets/asset/apiv1p5beta1/Client/ListAssets/main.go +++ b/internal/generated/snippets/asset/apiv1p5beta1/Client/ListAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudasset_generated_asset_apiv1p5beta1_Client_ListAssets] +// [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudasset_generated_asset_apiv1p5beta1_Client_ListAssets] +// [END cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] diff --git a/internal/generated/snippets/asset/apiv1p5beta1/Client/NewClient/main.go b/internal/generated/snippets/asset/apiv1p5beta1/Client/NewClient/main.go deleted file mode 100644 index 7d25a286e44..00000000000 --- a/internal/generated/snippets/asset/apiv1p5beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudasset_generated_asset_apiv1p5beta1_NewClient] - -package main - -import ( - "context" - - asset "cloud.google.com/go/asset/apiv1p5beta1" -) - -func main() { - ctx := context.Background() - c, err := asset.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudasset_generated_asset_apiv1p5beta1_NewClient] diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/CreateWorkload/main.go b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/CreateWorkload/main.go index 27564c20590..b31f90054a5 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/CreateWorkload/main.go +++ b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/CreateWorkload/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_CreateWorkload] +// [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_CreateWorkload] +// [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_CreateWorkload_sync] diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/DeleteWorkload/main.go b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/DeleteWorkload/main.go index b65a27e96af..37b9280f386 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/DeleteWorkload/main.go +++ b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/DeleteWorkload/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_DeleteWorkload] +// [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_DeleteWorkload] +// [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_DeleteWorkload_sync] diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/GetWorkload/main.go b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/GetWorkload/main.go index 6b1f91ffd57..f059f210d44 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/GetWorkload/main.go +++ b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/GetWorkload/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_GetWorkload] +// [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_GetWorkload] +// [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_GetWorkload_sync] diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/ListWorkloads/main.go b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/ListWorkloads/main.go index fcd399de9dd..c575454e54c 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/ListWorkloads/main.go +++ b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/ListWorkloads/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_ListWorkloads] +// [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_ListWorkloads] +// [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_ListWorkloads_sync] diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 5ed774e812d..00000000000 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START assuredworkloads_generated_assuredworkloads_apiv1beta1_NewClient] - -package main - -import ( - "context" - - assuredworkloads "cloud.google.com/go/assuredworkloads/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := assuredworkloads.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END assuredworkloads_generated_assuredworkloads_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/UpdateWorkload/main.go b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/UpdateWorkload/main.go index 0a190bd540d..b56ed034326 100644 --- a/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/UpdateWorkload/main.go +++ b/internal/generated/snippets/assuredworkloads/apiv1beta1/Client/UpdateWorkload/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_UpdateWorkload] +// [START assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END assuredworkloads_generated_assuredworkloads_apiv1beta1_Client_UpdateWorkload] +// [END assuredworkloads_v1beta1_generated_AssuredWorkloadsService_UpdateWorkload_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/CreateDataset/main.go b/internal/generated/snippets/automl/apiv1/Client/CreateDataset/main.go index 8d7cb090e6c..f09ffa3bcfb 100644 --- a/internal/generated/snippets/automl/apiv1/Client/CreateDataset/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/CreateDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_CreateDataset] +// [START automl_v1_generated_AutoMl_CreateDataset_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_CreateDataset] +// [END automl_v1_generated_AutoMl_CreateDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/CreateModel/main.go b/internal/generated/snippets/automl/apiv1/Client/CreateModel/main.go index ab4d5720dcc..e1b0b60e7a2 100644 --- a/internal/generated/snippets/automl/apiv1/Client/CreateModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/CreateModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_CreateModel] +// [START automl_v1_generated_AutoMl_CreateModel_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_CreateModel] +// [END automl_v1_generated_AutoMl_CreateModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/DeleteDataset/main.go b/internal/generated/snippets/automl/apiv1/Client/DeleteDataset/main.go index d30e8062293..cc0e5fe22f1 100644 --- a/internal/generated/snippets/automl/apiv1/Client/DeleteDataset/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/DeleteDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_DeleteDataset] +// [START automl_v1_generated_AutoMl_DeleteDataset_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_DeleteDataset] +// [END automl_v1_generated_AutoMl_DeleteDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/DeleteModel/main.go b/internal/generated/snippets/automl/apiv1/Client/DeleteModel/main.go index 1bb6adfe97a..83bf2817df9 100644 --- a/internal/generated/snippets/automl/apiv1/Client/DeleteModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/DeleteModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_DeleteModel] +// [START automl_v1_generated_AutoMl_DeleteModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_DeleteModel] +// [END automl_v1_generated_AutoMl_DeleteModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/DeployModel/main.go b/internal/generated/snippets/automl/apiv1/Client/DeployModel/main.go index 64828086398..65d57339be7 100644 --- a/internal/generated/snippets/automl/apiv1/Client/DeployModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/DeployModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_DeployModel] +// [START automl_v1_generated_AutoMl_DeployModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_DeployModel] +// [END automl_v1_generated_AutoMl_DeployModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/ExportData/main.go b/internal/generated/snippets/automl/apiv1/Client/ExportData/main.go index 894ae1483ec..c779d8157b6 100644 --- a/internal/generated/snippets/automl/apiv1/Client/ExportData/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/ExportData/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_ExportData] +// [START automl_v1_generated_AutoMl_ExportData_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_ExportData] +// [END automl_v1_generated_AutoMl_ExportData_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/ExportModel/main.go b/internal/generated/snippets/automl/apiv1/Client/ExportModel/main.go index 8d88bb09fbe..38c6fe86b77 100644 --- a/internal/generated/snippets/automl/apiv1/Client/ExportModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/ExportModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_ExportModel] +// [START automl_v1_generated_AutoMl_ExportModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_ExportModel] +// [END automl_v1_generated_AutoMl_ExportModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/GetAnnotationSpec/main.go b/internal/generated/snippets/automl/apiv1/Client/GetAnnotationSpec/main.go index 3096e9285d5..e30a5884561 100644 --- a/internal/generated/snippets/automl/apiv1/Client/GetAnnotationSpec/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/GetAnnotationSpec/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_GetAnnotationSpec] +// [START automl_v1_generated_AutoMl_GetAnnotationSpec_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_GetAnnotationSpec] +// [END automl_v1_generated_AutoMl_GetAnnotationSpec_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/GetDataset/main.go b/internal/generated/snippets/automl/apiv1/Client/GetDataset/main.go index ee79cbf330a..44ad32fa35b 100644 --- a/internal/generated/snippets/automl/apiv1/Client/GetDataset/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/GetDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_GetDataset] +// [START automl_v1_generated_AutoMl_GetDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_GetDataset] +// [END automl_v1_generated_AutoMl_GetDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/GetModel/main.go b/internal/generated/snippets/automl/apiv1/Client/GetModel/main.go index 11545cb39eb..7e595086f08 100644 --- a/internal/generated/snippets/automl/apiv1/Client/GetModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/GetModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_GetModel] +// [START automl_v1_generated_AutoMl_GetModel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_GetModel] +// [END automl_v1_generated_AutoMl_GetModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/GetModelEvaluation/main.go b/internal/generated/snippets/automl/apiv1/Client/GetModelEvaluation/main.go index ce415bb9718..252e287dd37 100644 --- a/internal/generated/snippets/automl/apiv1/Client/GetModelEvaluation/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/GetModelEvaluation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_GetModelEvaluation] +// [START automl_v1_generated_AutoMl_GetModelEvaluation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_GetModelEvaluation] +// [END automl_v1_generated_AutoMl_GetModelEvaluation_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/ImportData/main.go b/internal/generated/snippets/automl/apiv1/Client/ImportData/main.go index 548e7e30643..d7f4a7d0157 100644 --- a/internal/generated/snippets/automl/apiv1/Client/ImportData/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/ImportData/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_ImportData] +// [START automl_v1_generated_AutoMl_ImportData_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_ImportData] +// [END automl_v1_generated_AutoMl_ImportData_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/ListDatasets/main.go b/internal/generated/snippets/automl/apiv1/Client/ListDatasets/main.go index 60d99debf2a..43f4b0b7436 100644 --- a/internal/generated/snippets/automl/apiv1/Client/ListDatasets/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/ListDatasets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_ListDatasets] +// [START automl_v1_generated_AutoMl_ListDatasets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_ListDatasets] +// [END automl_v1_generated_AutoMl_ListDatasets_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/ListModelEvaluations/main.go b/internal/generated/snippets/automl/apiv1/Client/ListModelEvaluations/main.go index eab70f98507..c4ea216f97c 100644 --- a/internal/generated/snippets/automl/apiv1/Client/ListModelEvaluations/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/ListModelEvaluations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_ListModelEvaluations] +// [START automl_v1_generated_AutoMl_ListModelEvaluations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_ListModelEvaluations] +// [END automl_v1_generated_AutoMl_ListModelEvaluations_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/ListModels/main.go b/internal/generated/snippets/automl/apiv1/Client/ListModels/main.go index 289c661ef93..142a744da0d 100644 --- a/internal/generated/snippets/automl/apiv1/Client/ListModels/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/ListModels/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_ListModels] +// [START automl_v1_generated_AutoMl_ListModels_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_ListModels] +// [END automl_v1_generated_AutoMl_ListModels_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/NewClient/main.go b/internal/generated/snippets/automl/apiv1/Client/NewClient/main.go deleted file mode 100644 index 1a5914651cd..00000000000 --- a/internal/generated/snippets/automl/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START automl_generated_automl_apiv1_NewClient] - -package main - -import ( - "context" - - automl "cloud.google.com/go/automl/apiv1" -) - -func main() { - ctx := context.Background() - c, err := automl.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END automl_generated_automl_apiv1_NewClient] diff --git a/internal/generated/snippets/automl/apiv1/Client/UndeployModel/main.go b/internal/generated/snippets/automl/apiv1/Client/UndeployModel/main.go index 72766ab1203..f5410aed46f 100644 --- a/internal/generated/snippets/automl/apiv1/Client/UndeployModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/UndeployModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_UndeployModel] +// [START automl_v1_generated_AutoMl_UndeployModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1_Client_UndeployModel] +// [END automl_v1_generated_AutoMl_UndeployModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/UpdateDataset/main.go b/internal/generated/snippets/automl/apiv1/Client/UpdateDataset/main.go index 5bd269db8a7..39ff4ee4dd8 100644 --- a/internal/generated/snippets/automl/apiv1/Client/UpdateDataset/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/UpdateDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_UpdateDataset] +// [START automl_v1_generated_AutoMl_UpdateDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_UpdateDataset] +// [END automl_v1_generated_AutoMl_UpdateDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1/Client/UpdateModel/main.go b/internal/generated/snippets/automl/apiv1/Client/UpdateModel/main.go index 71df5da390d..8fd95806f41 100644 --- a/internal/generated/snippets/automl/apiv1/Client/UpdateModel/main.go +++ b/internal/generated/snippets/automl/apiv1/Client/UpdateModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_Client_UpdateModel] +// [START automl_v1_generated_AutoMl_UpdateModel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_Client_UpdateModel] +// [END automl_v1_generated_AutoMl_UpdateModel_sync] diff --git a/internal/generated/snippets/automl/apiv1/PredictionClient/BatchPredict/main.go b/internal/generated/snippets/automl/apiv1/PredictionClient/BatchPredict/main.go index 00803d44cb2..06851d12803 100644 --- a/internal/generated/snippets/automl/apiv1/PredictionClient/BatchPredict/main.go +++ b/internal/generated/snippets/automl/apiv1/PredictionClient/BatchPredict/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_PredictionClient_BatchPredict] +// [START automl_v1_generated_PredictionService_BatchPredict_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_PredictionClient_BatchPredict] +// [END automl_v1_generated_PredictionService_BatchPredict_sync] diff --git a/internal/generated/snippets/automl/apiv1/PredictionClient/NewPredictionClient/main.go b/internal/generated/snippets/automl/apiv1/PredictionClient/NewPredictionClient/main.go deleted file mode 100644 index b487b69ac5c..00000000000 --- a/internal/generated/snippets/automl/apiv1/PredictionClient/NewPredictionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START automl_generated_automl_apiv1_NewPredictionClient] - -package main - -import ( - "context" - - automl "cloud.google.com/go/automl/apiv1" -) - -func main() { - ctx := context.Background() - c, err := automl.NewPredictionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END automl_generated_automl_apiv1_NewPredictionClient] diff --git a/internal/generated/snippets/automl/apiv1/PredictionClient/Predict/main.go b/internal/generated/snippets/automl/apiv1/PredictionClient/Predict/main.go index 2af07e03282..77cb3c60d70 100644 --- a/internal/generated/snippets/automl/apiv1/PredictionClient/Predict/main.go +++ b/internal/generated/snippets/automl/apiv1/PredictionClient/Predict/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1_PredictionClient_Predict] +// [START automl_v1_generated_PredictionService_Predict_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1_PredictionClient_Predict] +// [END automl_v1_generated_PredictionService_Predict_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/CreateDataset/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/CreateDataset/main.go index 414de035e59..43245c40c08 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/CreateDataset/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/CreateDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_CreateDataset] +// [START automl_v1beta1_generated_AutoMl_CreateDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_CreateDataset] +// [END automl_v1beta1_generated_AutoMl_CreateDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/CreateModel/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/CreateModel/main.go index a46edeb39d4..2a228ba936f 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/CreateModel/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/CreateModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_CreateModel] +// [START automl_v1beta1_generated_AutoMl_CreateModel_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_CreateModel] +// [END automl_v1beta1_generated_AutoMl_CreateModel_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/DeleteDataset/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/DeleteDataset/main.go index 3b7d2043ca7..2ddaef2c04d 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/DeleteDataset/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/DeleteDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_DeleteDataset] +// [START automl_v1beta1_generated_AutoMl_DeleteDataset_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_DeleteDataset] +// [END automl_v1beta1_generated_AutoMl_DeleteDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/DeleteModel/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/DeleteModel/main.go index aef1c6bd0c7..882a22c113d 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/DeleteModel/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/DeleteModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_DeleteModel] +// [START automl_v1beta1_generated_AutoMl_DeleteModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_DeleteModel] +// [END automl_v1beta1_generated_AutoMl_DeleteModel_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/DeployModel/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/DeployModel/main.go index bf67e43351c..5656a8ac01e 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/DeployModel/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/DeployModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_DeployModel] +// [START automl_v1beta1_generated_AutoMl_DeployModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_DeployModel] +// [END automl_v1beta1_generated_AutoMl_DeployModel_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ExportData/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ExportData/main.go index e6bbcb827c3..f36bbc9a4d3 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ExportData/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ExportData/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ExportData] +// [START automl_v1beta1_generated_AutoMl_ExportData_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ExportData] +// [END automl_v1beta1_generated_AutoMl_ExportData_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ExportEvaluatedExamples/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ExportEvaluatedExamples/main.go index 269d19969e1..adabc7c4c26 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ExportEvaluatedExamples/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ExportEvaluatedExamples/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ExportEvaluatedExamples] +// [START automl_v1beta1_generated_AutoMl_ExportEvaluatedExamples_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ExportEvaluatedExamples] +// [END automl_v1beta1_generated_AutoMl_ExportEvaluatedExamples_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ExportModel/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ExportModel/main.go index 8e2d24b26a4..44ec29c94ff 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ExportModel/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ExportModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ExportModel] +// [START automl_v1beta1_generated_AutoMl_ExportModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ExportModel] +// [END automl_v1beta1_generated_AutoMl_ExportModel_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/GetAnnotationSpec/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/GetAnnotationSpec/main.go index 05fd1f7f4ea..652cf588e30 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/GetAnnotationSpec/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/GetAnnotationSpec/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_GetAnnotationSpec] +// [START automl_v1beta1_generated_AutoMl_GetAnnotationSpec_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_GetAnnotationSpec] +// [END automl_v1beta1_generated_AutoMl_GetAnnotationSpec_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/GetColumnSpec/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/GetColumnSpec/main.go index 6632311ab69..6cca054b1a6 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/GetColumnSpec/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/GetColumnSpec/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_GetColumnSpec] +// [START automl_v1beta1_generated_AutoMl_GetColumnSpec_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_GetColumnSpec] +// [END automl_v1beta1_generated_AutoMl_GetColumnSpec_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/GetDataset/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/GetDataset/main.go index 55945956400..e011cbb755b 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/GetDataset/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/GetDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_GetDataset] +// [START automl_v1beta1_generated_AutoMl_GetDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_GetDataset] +// [END automl_v1beta1_generated_AutoMl_GetDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/GetModel/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/GetModel/main.go index b5a4bfc83a7..a52311ee065 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/GetModel/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/GetModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_GetModel] +// [START automl_v1beta1_generated_AutoMl_GetModel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_GetModel] +// [END automl_v1beta1_generated_AutoMl_GetModel_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/GetModelEvaluation/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/GetModelEvaluation/main.go index 67622cacf99..847dd359410 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/GetModelEvaluation/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/GetModelEvaluation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_GetModelEvaluation] +// [START automl_v1beta1_generated_AutoMl_GetModelEvaluation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_GetModelEvaluation] +// [END automl_v1beta1_generated_AutoMl_GetModelEvaluation_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/GetTableSpec/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/GetTableSpec/main.go index 8b688166d32..18f6fb615cc 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/GetTableSpec/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/GetTableSpec/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_GetTableSpec] +// [START automl_v1beta1_generated_AutoMl_GetTableSpec_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_GetTableSpec] +// [END automl_v1beta1_generated_AutoMl_GetTableSpec_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ImportData/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ImportData/main.go index 135a65e277e..ca44622e3a1 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ImportData/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ImportData/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ImportData] +// [START automl_v1beta1_generated_AutoMl_ImportData_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ImportData] +// [END automl_v1beta1_generated_AutoMl_ImportData_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ListColumnSpecs/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ListColumnSpecs/main.go index 5ee67a64713..0bd4cceb6d2 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ListColumnSpecs/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ListColumnSpecs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ListColumnSpecs] +// [START automl_v1beta1_generated_AutoMl_ListColumnSpecs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ListColumnSpecs] +// [END automl_v1beta1_generated_AutoMl_ListColumnSpecs_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ListDatasets/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ListDatasets/main.go index 32dd231bd10..1182ae50182 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ListDatasets/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ListDatasets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ListDatasets] +// [START automl_v1beta1_generated_AutoMl_ListDatasets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ListDatasets] +// [END automl_v1beta1_generated_AutoMl_ListDatasets_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ListModelEvaluations/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ListModelEvaluations/main.go index f95b381f54a..ab380087575 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ListModelEvaluations/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ListModelEvaluations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ListModelEvaluations] +// [START automl_v1beta1_generated_AutoMl_ListModelEvaluations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ListModelEvaluations] +// [END automl_v1beta1_generated_AutoMl_ListModelEvaluations_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ListModels/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ListModels/main.go index 016ba4a3fb7..e278ec5fbc8 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ListModels/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ListModels/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ListModels] +// [START automl_v1beta1_generated_AutoMl_ListModels_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ListModels] +// [END automl_v1beta1_generated_AutoMl_ListModels_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/ListTableSpecs/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/ListTableSpecs/main.go index 6553175a7cc..e411c4b5b50 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/ListTableSpecs/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/ListTableSpecs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_ListTableSpecs] +// [START automl_v1beta1_generated_AutoMl_ListTableSpecs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_ListTableSpecs] +// [END automl_v1beta1_generated_AutoMl_ListTableSpecs_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index fb1da5a7439..00000000000 --- a/internal/generated/snippets/automl/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START automl_generated_automl_apiv1beta1_NewClient] - -package main - -import ( - "context" - - automl "cloud.google.com/go/automl/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := automl.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END automl_generated_automl_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/UndeployModel/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/UndeployModel/main.go index ae361390372..6b05a2de234 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/UndeployModel/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/UndeployModel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_UndeployModel] +// [START automl_v1beta1_generated_AutoMl_UndeployModel_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END automl_generated_automl_apiv1beta1_Client_UndeployModel] +// [END automl_v1beta1_generated_AutoMl_UndeployModel_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/UpdateColumnSpec/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/UpdateColumnSpec/main.go index f17dc4b4e91..23b3d58d5ef 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/UpdateColumnSpec/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/UpdateColumnSpec/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_UpdateColumnSpec] +// [START automl_v1beta1_generated_AutoMl_UpdateColumnSpec_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_UpdateColumnSpec] +// [END automl_v1beta1_generated_AutoMl_UpdateColumnSpec_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/UpdateDataset/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/UpdateDataset/main.go index 2cc313d27f6..cd16a2fd86b 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/UpdateDataset/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/UpdateDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_UpdateDataset] +// [START automl_v1beta1_generated_AutoMl_UpdateDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_UpdateDataset] +// [END automl_v1beta1_generated_AutoMl_UpdateDataset_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/Client/UpdateTableSpec/main.go b/internal/generated/snippets/automl/apiv1beta1/Client/UpdateTableSpec/main.go index 80172a8b167..0720723469b 100644 --- a/internal/generated/snippets/automl/apiv1beta1/Client/UpdateTableSpec/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/Client/UpdateTableSpec/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_Client_UpdateTableSpec] +// [START automl_v1beta1_generated_AutoMl_UpdateTableSpec_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_Client_UpdateTableSpec] +// [END automl_v1beta1_generated_AutoMl_UpdateTableSpec_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/PredictionClient/BatchPredict/main.go b/internal/generated/snippets/automl/apiv1beta1/PredictionClient/BatchPredict/main.go index b2ec4d60759..cc1eb6d8c1d 100644 --- a/internal/generated/snippets/automl/apiv1beta1/PredictionClient/BatchPredict/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/PredictionClient/BatchPredict/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_PredictionClient_BatchPredict] +// [START automl_v1beta1_generated_PredictionService_BatchPredict_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_PredictionClient_BatchPredict] +// [END automl_v1beta1_generated_PredictionService_BatchPredict_sync] diff --git a/internal/generated/snippets/automl/apiv1beta1/PredictionClient/NewPredictionClient/main.go b/internal/generated/snippets/automl/apiv1beta1/PredictionClient/NewPredictionClient/main.go deleted file mode 100644 index 68e22d42145..00000000000 --- a/internal/generated/snippets/automl/apiv1beta1/PredictionClient/NewPredictionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START automl_generated_automl_apiv1beta1_NewPredictionClient] - -package main - -import ( - "context" - - automl "cloud.google.com/go/automl/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := automl.NewPredictionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END automl_generated_automl_apiv1beta1_NewPredictionClient] diff --git a/internal/generated/snippets/automl/apiv1beta1/PredictionClient/Predict/main.go b/internal/generated/snippets/automl/apiv1beta1/PredictionClient/Predict/main.go index 7d5f941b593..466d4da3a00 100644 --- a/internal/generated/snippets/automl/apiv1beta1/PredictionClient/Predict/main.go +++ b/internal/generated/snippets/automl/apiv1beta1/PredictionClient/Predict/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START automl_generated_automl_apiv1beta1_PredictionClient_Predict] +// [START automl_v1beta1_generated_PredictionService_Predict_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END automl_generated_automl_apiv1beta1_PredictionClient_Predict] +// [END automl_v1beta1_generated_PredictionService_Predict_sync] diff --git a/internal/generated/snippets/bigquery/Client/Dataset/main.go b/internal/generated/snippets/bigquery/Client/Dataset/main.go deleted file mode 100644 index 6de99d0ceb3..00000000000 --- a/internal/generated/snippets/bigquery/Client/Dataset/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_Dataset] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.Dataset("my_dataset") - fmt.Println(ds) -} - -// [END bigquery_generated_bigquery_Client_Dataset] diff --git a/internal/generated/snippets/bigquery/Client/DatasetInProject/main.go b/internal/generated/snippets/bigquery/Client/DatasetInProject/main.go deleted file mode 100644 index 0a19f28dbc3..00000000000 --- a/internal/generated/snippets/bigquery/Client/DatasetInProject/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_DatasetInProject] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.DatasetInProject("their-project-id", "their-dataset") - fmt.Println(ds) -} - -// [END bigquery_generated_bigquery_Client_DatasetInProject] diff --git a/internal/generated/snippets/bigquery/Client/Datasets/main.go b/internal/generated/snippets/bigquery/Client/Datasets/main.go deleted file mode 100644 index b2527311981..00000000000 --- a/internal/generated/snippets/bigquery/Client/Datasets/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_Datasets] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Datasets(ctx) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Client_Datasets] diff --git a/internal/generated/snippets/bigquery/Client/DatasetsInProject/main.go b/internal/generated/snippets/bigquery/Client/DatasetsInProject/main.go deleted file mode 100644 index 578edd1b01e..00000000000 --- a/internal/generated/snippets/bigquery/Client/DatasetsInProject/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_DatasetsInProject] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.DatasetsInProject(ctx, "their-project-id") - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Client_DatasetsInProject] diff --git a/internal/generated/snippets/bigquery/Client/JobFromID/main.go b/internal/generated/snippets/bigquery/Client/JobFromID/main.go deleted file mode 100644 index 6e505ce482b..00000000000 --- a/internal/generated/snippets/bigquery/Client/JobFromID/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_JobFromID] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func getJobID() string { return "" } - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - jobID := getJobID() // Get a job ID using Job.ID, the console or elsewhere. - job, err := client.JobFromID(ctx, jobID) - if err != nil { - // TODO: Handle error. - } - fmt.Println(job.LastStatus()) // Display the job's status. -} - -// [END bigquery_generated_bigquery_Client_JobFromID] diff --git a/internal/generated/snippets/bigquery/Client/Jobs/main.go b/internal/generated/snippets/bigquery/Client/Jobs/main.go deleted file mode 100644 index dd792a81415..00000000000 --- a/internal/generated/snippets/bigquery/Client/Jobs/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_Jobs] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Jobs(ctx) - it.State = bigquery.Running // list only running jobs. - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Client_Jobs] diff --git a/internal/generated/snippets/bigquery/Client/NewClient/main.go b/internal/generated/snippets/bigquery/Client/NewClient/main.go deleted file mode 100644 index 97c71da458e..00000000000 --- a/internal/generated/snippets/bigquery/Client/NewClient/main.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - _ = client // TODO: Use client. -} - -// [END bigquery_generated_bigquery_NewClient] diff --git a/internal/generated/snippets/bigquery/Client/Query/encryptionKey/main.go b/internal/generated/snippets/bigquery/Client/Query/encryptionKey/main.go deleted file mode 100644 index a444f6b45c2..00000000000 --- a/internal/generated/snippets/bigquery/Client/Query/encryptionKey/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_Query_encryptionKey] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - q := client.Query("select name, num from t1") - // TODO: Replace this key with a key you have created in Cloud KMS. - keyName := "projects/P/locations/L/keyRings/R/cryptoKeys/K" - q.DestinationEncryptionConfig = &bigquery.EncryptionConfig{KMSKeyName: keyName} - // TODO: set other options on the Query. - // TODO: Call Query.Run or Query.Read. -} - -// [END bigquery_generated_bigquery_Client_Query_encryptionKey] diff --git a/internal/generated/snippets/bigquery/Client/Query/main.go b/internal/generated/snippets/bigquery/Client/Query/main.go deleted file mode 100644 index 8a8803cfea4..00000000000 --- a/internal/generated/snippets/bigquery/Client/Query/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_Query] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - q := client.Query("select name, num from t1") - q.DefaultProjectID = "project-id" - // TODO: set other options on the Query. - // TODO: Call Query.Run or Query.Read. -} - -// [END bigquery_generated_bigquery_Client_Query] diff --git a/internal/generated/snippets/bigquery/Client/Query/parameters/main.go b/internal/generated/snippets/bigquery/Client/Query/parameters/main.go deleted file mode 100644 index 62ec340a612..00000000000 --- a/internal/generated/snippets/bigquery/Client/Query/parameters/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Client_Query_parameters] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - q := client.Query("select num from t1 where name = @user") - q.Parameters = []bigquery.QueryParameter{ - {Name: "user", Value: "Elizabeth"}, - } - // TODO: set other options on the Query. - // TODO: Call Query.Run or Query.Read. -} - -// [END bigquery_generated_bigquery_Client_Query_parameters] diff --git a/internal/generated/snippets/bigquery/Dataset/Create/main.go b/internal/generated/snippets/bigquery/Dataset/Create/main.go deleted file mode 100644 index 240e511b07f..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Create/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Create] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.Dataset("my_dataset") - if err := ds.Create(ctx, &bigquery.DatasetMetadata{Location: "EU"}); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Dataset_Create] diff --git a/internal/generated/snippets/bigquery/Dataset/Delete/main.go b/internal/generated/snippets/bigquery/Dataset/Delete/main.go deleted file mode 100644 index 8f6be454207..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Delete/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - if err := client.Dataset("my_dataset").Delete(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Dataset_Delete] diff --git a/internal/generated/snippets/bigquery/Dataset/Metadata/main.go b/internal/generated/snippets/bigquery/Dataset/Metadata/main.go deleted file mode 100644 index 9011e3d1701..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Metadata/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Metadata] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - md, err := client.Dataset("my_dataset").Metadata(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Println(md) -} - -// [END bigquery_generated_bigquery_Dataset_Metadata] diff --git a/internal/generated/snippets/bigquery/Dataset/Table/main.go b/internal/generated/snippets/bigquery/Dataset/Table/main.go deleted file mode 100644 index 83c5537b892..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Table/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Table] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // Table creates a reference to the table. It does not create the actual - // table in BigQuery; to do so, use Table.Create. - t := client.Dataset("my_dataset").Table("my_table") - fmt.Println(t) -} - -// [END bigquery_generated_bigquery_Dataset_Table] diff --git a/internal/generated/snippets/bigquery/Dataset/Tables/main.go b/internal/generated/snippets/bigquery/Dataset/Tables/main.go deleted file mode 100644 index 4c7b48c6e24..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Tables/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Tables] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Dataset("my_dataset").Tables(ctx) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Dataset_Tables] diff --git a/internal/generated/snippets/bigquery/Dataset/Update/blindWrite/main.go b/internal/generated/snippets/bigquery/Dataset/Update/blindWrite/main.go deleted file mode 100644 index f856ac46f94..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Update/blindWrite/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Update_blindWrite] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - md, err := client.Dataset("my_dataset").Update(ctx, bigquery.DatasetMetadataToUpdate{Name: "blind"}, "") - if err != nil { - // TODO: Handle error. - } - fmt.Println(md) -} - -// [END bigquery_generated_bigquery_Dataset_Update_blindWrite] diff --git a/internal/generated/snippets/bigquery/Dataset/Update/readModifyWrite/main.go b/internal/generated/snippets/bigquery/Dataset/Update/readModifyWrite/main.go deleted file mode 100644 index f3f6e010c0d..00000000000 --- a/internal/generated/snippets/bigquery/Dataset/Update/readModifyWrite/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Dataset_Update_readModifyWrite] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.Dataset("my_dataset") - md, err := ds.Metadata(ctx) - if err != nil { - // TODO: Handle error. - } - md2, err := ds.Update(ctx, - bigquery.DatasetMetadataToUpdate{Name: "new " + md.Name}, - md.ETag) - if err != nil { - // TODO: Handle error. - } - fmt.Println(md2) -} - -// [END bigquery_generated_bigquery_Dataset_Update_readModifyWrite] diff --git a/internal/generated/snippets/bigquery/DatasetIterator/Next/main.go b/internal/generated/snippets/bigquery/DatasetIterator/Next/main.go deleted file mode 100644 index 6ea2d305362..00000000000 --- a/internal/generated/snippets/bigquery/DatasetIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_DatasetIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Datasets(ctx) - for { - ds, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(ds) - } -} - -// [END bigquery_generated_bigquery_DatasetIterator_Next] diff --git a/internal/generated/snippets/bigquery/GCSReference/NewGCSReference/main.go b/internal/generated/snippets/bigquery/GCSReference/NewGCSReference/main.go deleted file mode 100644 index 5d1179f9e78..00000000000 --- a/internal/generated/snippets/bigquery/GCSReference/NewGCSReference/main.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_NewGCSReference] - -package main - -import ( - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - gcsRef := bigquery.NewGCSReference("gs://my-bucket/my-object") - fmt.Println(gcsRef) -} - -// [END bigquery_generated_bigquery_NewGCSReference] diff --git a/internal/generated/snippets/bigquery/Inserter/Put/main.go b/internal/generated/snippets/bigquery/Inserter/Put/main.go deleted file mode 100644 index 1040177ad01..00000000000 --- a/internal/generated/snippets/bigquery/Inserter/Put/main.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Inserter_Put] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -type Item struct { - Name string - Size float64 - Count int -} - -// Save implements the ValueSaver interface. -func (i *Item) Save() (map[string]bigquery.Value, string, error) { - return map[string]bigquery.Value{ - "Name": i.Name, - "Size": i.Size, - "Count": i.Count, - }, "", nil -} - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ins := client.Dataset("my_dataset").Table("my_table").Inserter() - // Item implements the ValueSaver interface. - items := []*Item{ - {Name: "n1", Size: 32.6, Count: 7}, - {Name: "n2", Size: 4, Count: 2}, - {Name: "n3", Size: 101.5, Count: 1}, - } - if err := ins.Put(ctx, items); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Inserter_Put] diff --git a/internal/generated/snippets/bigquery/Inserter/Put/struct/main.go b/internal/generated/snippets/bigquery/Inserter/Put/struct/main.go deleted file mode 100644 index 1b10af1c897..00000000000 --- a/internal/generated/snippets/bigquery/Inserter/Put/struct/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Inserter_Put_struct] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ins := client.Dataset("my_dataset").Table("my_table").Inserter() - - type score struct { - Name string - Num int - } - scores := []score{ - {Name: "n1", Num: 12}, - {Name: "n2", Num: 31}, - {Name: "n3", Num: 7}, - } - // Schema is inferred from the score type. - if err := ins.Put(ctx, scores); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Inserter_Put_struct] diff --git a/internal/generated/snippets/bigquery/Inserter/Put/structSaver/main.go b/internal/generated/snippets/bigquery/Inserter/Put/structSaver/main.go deleted file mode 100644 index 650253fb843..00000000000 --- a/internal/generated/snippets/bigquery/Inserter/Put/structSaver/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Inserter_Put_structSaver] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -var schema bigquery.Schema - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ins := client.Dataset("my_dataset").Table("my_table").Inserter() - - type score struct { - Name string - Num int - } - - // Assume schema holds the table's schema. - savers := []*bigquery.StructSaver{ - {Struct: score{Name: "n1", Num: 12}, Schema: schema, InsertID: "id1"}, - {Struct: score{Name: "n2", Num: 31}, Schema: schema, InsertID: "id2"}, - {Struct: score{Name: "n3", Num: 7}, Schema: schema, InsertID: "id3"}, - } - if err := ins.Put(ctx, savers); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Inserter_Put_structSaver] diff --git a/internal/generated/snippets/bigquery/Inserter/Put/valuesSaver/main.go b/internal/generated/snippets/bigquery/Inserter/Put/valuesSaver/main.go deleted file mode 100644 index 2c5e228812a..00000000000 --- a/internal/generated/snippets/bigquery/Inserter/Put/valuesSaver/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Inserter_Put_valuesSaver] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -var schema bigquery.Schema - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - ins := client.Dataset("my_dataset").Table("my_table").Inserter() - - var vss []*bigquery.ValuesSaver - for i, name := range []string{"n1", "n2", "n3"} { - // Assume schema holds the table's schema. - vss = append(vss, &bigquery.ValuesSaver{ - Schema: schema, - InsertID: name, - Row: []bigquery.Value{name, int64(i)}, - }) - } - - if err := ins.Put(ctx, vss); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Inserter_Put_valuesSaver] diff --git a/internal/generated/snippets/bigquery/Job/Config/main.go b/internal/generated/snippets/bigquery/Job/Config/main.go deleted file mode 100644 index e34c41436e7..00000000000 --- a/internal/generated/snippets/bigquery/Job/Config/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Job_Config] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.Dataset("my_dataset") - job, err := ds.Table("t1").CopierFrom(ds.Table("t2")).Run(ctx) - if err != nil { - // TODO: Handle error. - } - jc, err := job.Config() - if err != nil { - // TODO: Handle error. - } - copyConfig := jc.(*bigquery.CopyConfig) - fmt.Println(copyConfig.Dst, copyConfig.CreateDisposition) -} - -// [END bigquery_generated_bigquery_Job_Config] diff --git a/internal/generated/snippets/bigquery/Job/Read/main.go b/internal/generated/snippets/bigquery/Job/Read/main.go deleted file mode 100644 index f02e0dbbcc7..00000000000 --- a/internal/generated/snippets/bigquery/Job/Read/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Job_Read] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - q := client.Query("select name, num from t1") - // Call Query.Run to get a Job, then call Read on the job. - // Note: Query.Read is a shorthand for this. - job, err := q.Run(ctx) - if err != nil { - // TODO: Handle error. - } - it, err := job.Read(ctx) - if err != nil { - // TODO: Handle error. - } - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Job_Read] diff --git a/internal/generated/snippets/bigquery/Job/Wait/main.go b/internal/generated/snippets/bigquery/Job/Wait/main.go deleted file mode 100644 index dfaf29bfad2..00000000000 --- a/internal/generated/snippets/bigquery/Job/Wait/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Job_Wait] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.Dataset("my_dataset") - job, err := ds.Table("t1").CopierFrom(ds.Table("t2")).Run(ctx) - if err != nil { - // TODO: Handle error. - } - status, err := job.Wait(ctx) - if err != nil { - // TODO: Handle error. - } - if status.Err() != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Job_Wait] diff --git a/internal/generated/snippets/bigquery/Query/Read/main.go b/internal/generated/snippets/bigquery/Query/Read/main.go deleted file mode 100644 index b5d5c7dc7b1..00000000000 --- a/internal/generated/snippets/bigquery/Query/Read/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Query_Read] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - q := client.Query("select name, num from t1") - it, err := q.Read(ctx) - if err != nil { - // TODO: Handle error. - } - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Query_Read] diff --git a/internal/generated/snippets/bigquery/RowIterator/Next/main.go b/internal/generated/snippets/bigquery/RowIterator/Next/main.go deleted file mode 100644 index 0f293132fe6..00000000000 --- a/internal/generated/snippets/bigquery/RowIterator/Next/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_RowIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - q := client.Query("select name, num from t1") - it, err := q.Read(ctx) - if err != nil { - // TODO: Handle error. - } - for { - var row []bigquery.Value - err := it.Next(&row) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(row) - } -} - -// [END bigquery_generated_bigquery_RowIterator_Next] diff --git a/internal/generated/snippets/bigquery/RowIterator/Next/struct/main.go b/internal/generated/snippets/bigquery/RowIterator/Next/struct/main.go deleted file mode 100644 index 68b8900aa6e..00000000000 --- a/internal/generated/snippets/bigquery/RowIterator/Next/struct/main.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_RowIterator_Next_struct] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - type score struct { - Name string - Num int - } - - q := client.Query("select name, num from t1") - it, err := q.Read(ctx) - if err != nil { - // TODO: Handle error. - } - for { - var s score - err := it.Next(&s) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(s) - } -} - -// [END bigquery_generated_bigquery_RowIterator_Next_struct] diff --git a/internal/generated/snippets/bigquery/Schema/InferSchema/main.go b/internal/generated/snippets/bigquery/Schema/InferSchema/main.go deleted file mode 100644 index 2e02e3b3bb5..00000000000 --- a/internal/generated/snippets/bigquery/Schema/InferSchema/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_InferSchema] - -package main - -import ( - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - type Item struct { - Name string - Size float64 - Count int - } - schema, err := bigquery.InferSchema(Item{}) - if err != nil { - fmt.Println(err) - // TODO: Handle error. - } - for _, fs := range schema { - fmt.Println(fs.Name, fs.Type) - } -} - -// [END bigquery_generated_bigquery_InferSchema] diff --git a/internal/generated/snippets/bigquery/Schema/InferSchema/tags/main.go b/internal/generated/snippets/bigquery/Schema/InferSchema/tags/main.go deleted file mode 100644 index 0f4cc4363ea..00000000000 --- a/internal/generated/snippets/bigquery/Schema/InferSchema/tags/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_InferSchema_tags] - -package main - -import ( - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - type Item struct { - Name string - Size float64 - Count int `bigquery:"number"` - Secret []byte `bigquery:"-"` - Optional bigquery.NullBool - OptBytes []byte `bigquery:",nullable"` - } - schema, err := bigquery.InferSchema(Item{}) - if err != nil { - fmt.Println(err) - // TODO: Handle error. - } - for _, fs := range schema { - fmt.Println(fs.Name, fs.Type, fs.Required) - } -} - -// [END bigquery_generated_bigquery_InferSchema_tags] diff --git a/internal/generated/snippets/bigquery/Table/CopierFrom/main.go b/internal/generated/snippets/bigquery/Table/CopierFrom/main.go deleted file mode 100644 index b4d52f093bd..00000000000 --- a/internal/generated/snippets/bigquery/Table/CopierFrom/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_CopierFrom] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ds := client.Dataset("my_dataset") - c := ds.Table("combined").CopierFrom(ds.Table("t1"), ds.Table("t2")) - c.WriteDisposition = bigquery.WriteTruncate - // TODO: set other options on the Copier. - job, err := c.Run(ctx) - if err != nil { - // TODO: Handle error. - } - status, err := job.Wait(ctx) - if err != nil { - // TODO: Handle error. - } - if status.Err() != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Table_CopierFrom] diff --git a/internal/generated/snippets/bigquery/Table/Create/encryptionKey/main.go b/internal/generated/snippets/bigquery/Table/Create/encryptionKey/main.go deleted file mode 100644 index 1f9976e6479..00000000000 --- a/internal/generated/snippets/bigquery/Table/Create/encryptionKey/main.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Create_encryptionKey] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - // Infer table schema from a Go type. - schema, err := bigquery.InferSchema(Item{}) - if err != nil { - // TODO: Handle error. - } - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - t := client.Dataset("my_dataset").Table("new-table") - - // TODO: Replace this key with a key you have created in Cloud KMS. - keyName := "projects/P/locations/L/keyRings/R/cryptoKeys/K" - if err := t.Create(ctx, - &bigquery.TableMetadata{ - Name: "My New Table", - Schema: schema, - EncryptionConfig: &bigquery.EncryptionConfig{KMSKeyName: keyName}, - }); err != nil { - // TODO: Handle error. - } -} - -type Item struct { - Name string - Size float64 - Count int -} - -// Save implements the ValueSaver interface. -func (i *Item) Save() (map[string]bigquery.Value, string, error) { - return map[string]bigquery.Value{ - "Name": i.Name, - "Size": i.Size, - "Count": i.Count, - }, "", nil -} - -// [END bigquery_generated_bigquery_Table_Create_encryptionKey] diff --git a/internal/generated/snippets/bigquery/Table/Create/initialize/main.go b/internal/generated/snippets/bigquery/Table/Create/initialize/main.go deleted file mode 100644 index 17ada83af26..00000000000 --- a/internal/generated/snippets/bigquery/Table/Create/initialize/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Create_initialize] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - // Infer table schema from a Go type. - schema, err := bigquery.InferSchema(Item{}) - if err != nil { - // TODO: Handle error. - } - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - t := client.Dataset("my_dataset").Table("new-table") - if err := t.Create(ctx, - &bigquery.TableMetadata{ - Name: "My New Table", - Schema: schema, - ExpirationTime: time.Now().Add(24 * time.Hour), - }); err != nil { - // TODO: Handle error. - } -} - -type Item struct { - Name string - Size float64 - Count int -} - -// Save implements the ValueSaver interface. -func (i *Item) Save() (map[string]bigquery.Value, string, error) { - return map[string]bigquery.Value{ - "Name": i.Name, - "Size": i.Size, - "Count": i.Count, - }, "", nil -} - -// [END bigquery_generated_bigquery_Table_Create_initialize] diff --git a/internal/generated/snippets/bigquery/Table/Create/main.go b/internal/generated/snippets/bigquery/Table/Create/main.go deleted file mode 100644 index f35ed734a4e..00000000000 --- a/internal/generated/snippets/bigquery/Table/Create/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Create] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - t := client.Dataset("my_dataset").Table("new-table") - if err := t.Create(ctx, nil); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Table_Create] diff --git a/internal/generated/snippets/bigquery/Table/Delete/main.go b/internal/generated/snippets/bigquery/Table/Delete/main.go deleted file mode 100644 index 408242c965a..00000000000 --- a/internal/generated/snippets/bigquery/Table/Delete/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - if err := client.Dataset("my_dataset").Table("my_table").Delete(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Table_Delete] diff --git a/internal/generated/snippets/bigquery/Table/ExtractorTo/main.go b/internal/generated/snippets/bigquery/Table/ExtractorTo/main.go deleted file mode 100644 index defcf696f03..00000000000 --- a/internal/generated/snippets/bigquery/Table/ExtractorTo/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_ExtractorTo] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - gcsRef := bigquery.NewGCSReference("gs://my-bucket/my-object") - gcsRef.FieldDelimiter = ":" - // TODO: set other options on the GCSReference. - ds := client.Dataset("my_dataset") - extractor := ds.Table("my_table").ExtractorTo(gcsRef) - extractor.DisableHeader = true - // TODO: set other options on the Extractor. - job, err := extractor.Run(ctx) - if err != nil { - // TODO: Handle error. - } - status, err := job.Wait(ctx) - if err != nil { - // TODO: Handle error. - } - if status.Err() != nil { - // TODO: Handle error. - } -} - -// [END bigquery_generated_bigquery_Table_ExtractorTo] diff --git a/internal/generated/snippets/bigquery/Table/Inserter/main.go b/internal/generated/snippets/bigquery/Table/Inserter/main.go deleted file mode 100644 index e225dccc5d1..00000000000 --- a/internal/generated/snippets/bigquery/Table/Inserter/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Inserter] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ins := client.Dataset("my_dataset").Table("my_table").Inserter() - _ = ins // TODO: Use ins. -} - -// [END bigquery_generated_bigquery_Table_Inserter] diff --git a/internal/generated/snippets/bigquery/Table/Inserter/options/main.go b/internal/generated/snippets/bigquery/Table/Inserter/options/main.go deleted file mode 100644 index e8a6d7fdf51..00000000000 --- a/internal/generated/snippets/bigquery/Table/Inserter/options/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Inserter_options] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - ins := client.Dataset("my_dataset").Table("my_table").Inserter() - ins.SkipInvalidRows = true - ins.IgnoreUnknownValues = true - _ = ins // TODO: Use ins. -} - -// [END bigquery_generated_bigquery_Table_Inserter_options] diff --git a/internal/generated/snippets/bigquery/Table/LoaderFrom/main.go b/internal/generated/snippets/bigquery/Table/LoaderFrom/main.go deleted file mode 100644 index e28dd764a31..00000000000 --- a/internal/generated/snippets/bigquery/Table/LoaderFrom/main.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_LoaderFrom] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - gcsRef := bigquery.NewGCSReference("gs://my-bucket/my-object") - gcsRef.AllowJaggedRows = true - gcsRef.MaxBadRecords = 5 - gcsRef.Schema = schema - // TODO: set other options on the GCSReference. - ds := client.Dataset("my_dataset") - loader := ds.Table("my_table").LoaderFrom(gcsRef) - loader.CreateDisposition = bigquery.CreateNever - // TODO: set other options on the Loader. - job, err := loader.Run(ctx) - if err != nil { - // TODO: Handle error. - } - status, err := job.Wait(ctx) - if err != nil { - // TODO: Handle error. - } - if status.Err() != nil { - // TODO: Handle error. - } -} - -var schema bigquery.Schema - -// [END bigquery_generated_bigquery_Table_LoaderFrom] diff --git a/internal/generated/snippets/bigquery/Table/LoaderFrom/reader/main.go b/internal/generated/snippets/bigquery/Table/LoaderFrom/reader/main.go deleted file mode 100644 index b9228a3fd53..00000000000 --- a/internal/generated/snippets/bigquery/Table/LoaderFrom/reader/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_LoaderFrom_reader] - -package main - -import ( - "context" - "os" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - f, err := os.Open("data.csv") - if err != nil { - // TODO: Handle error. - } - rs := bigquery.NewReaderSource(f) - rs.AllowJaggedRows = true - rs.MaxBadRecords = 5 - rs.Schema = schema - // TODO: set other options on the GCSReference. - ds := client.Dataset("my_dataset") - loader := ds.Table("my_table").LoaderFrom(rs) - loader.CreateDisposition = bigquery.CreateNever - // TODO: set other options on the Loader. - job, err := loader.Run(ctx) - if err != nil { - // TODO: Handle error. - } - status, err := job.Wait(ctx) - if err != nil { - // TODO: Handle error. - } - if status.Err() != nil { - // TODO: Handle error. - } -} - -var schema bigquery.Schema - -// [END bigquery_generated_bigquery_Table_LoaderFrom_reader] diff --git a/internal/generated/snippets/bigquery/Table/Metadata/main.go b/internal/generated/snippets/bigquery/Table/Metadata/main.go deleted file mode 100644 index 88770d6e113..00000000000 --- a/internal/generated/snippets/bigquery/Table/Metadata/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Metadata] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - md, err := client.Dataset("my_dataset").Table("my_table").Metadata(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Println(md) -} - -// [END bigquery_generated_bigquery_Table_Metadata] diff --git a/internal/generated/snippets/bigquery/Table/Read/main.go b/internal/generated/snippets/bigquery/Table/Read/main.go deleted file mode 100644 index 1e6aa0f7d52..00000000000 --- a/internal/generated/snippets/bigquery/Table/Read/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Read] - -package main - -import ( - "context" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Dataset("my_dataset").Table("my_table").Read(ctx) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END bigquery_generated_bigquery_Table_Read] diff --git a/internal/generated/snippets/bigquery/Table/Update/blindWrite/main.go b/internal/generated/snippets/bigquery/Table/Update/blindWrite/main.go deleted file mode 100644 index b97fac78196..00000000000 --- a/internal/generated/snippets/bigquery/Table/Update/blindWrite/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Update_blindWrite] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - t := client.Dataset("my_dataset").Table("my_table") - tm, err := t.Update(ctx, bigquery.TableMetadataToUpdate{ - Description: "my favorite table", - }, "") - if err != nil { - // TODO: Handle error. - } - fmt.Println(tm) -} - -// [END bigquery_generated_bigquery_Table_Update_blindWrite] diff --git a/internal/generated/snippets/bigquery/Table/Update/readModifyWrite/main.go b/internal/generated/snippets/bigquery/Table/Update/readModifyWrite/main.go deleted file mode 100644 index 241f0d49d5a..00000000000 --- a/internal/generated/snippets/bigquery/Table/Update/readModifyWrite/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_Table_Update_readModifyWrite] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - t := client.Dataset("my_dataset").Table("my_table") - md, err := t.Metadata(ctx) - if err != nil { - // TODO: Handle error. - } - md2, err := t.Update(ctx, - bigquery.TableMetadataToUpdate{Name: "new " + md.Name}, - md.ETag) - if err != nil { - // TODO: Handle error. - } - fmt.Println(md2) -} - -// [END bigquery_generated_bigquery_Table_Update_readModifyWrite] diff --git a/internal/generated/snippets/bigquery/TableIterator/Next/main.go b/internal/generated/snippets/bigquery/TableIterator/Next/main.go deleted file mode 100644 index 5a1c8395adc..00000000000 --- a/internal/generated/snippets/bigquery/TableIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquery_generated_bigquery_TableIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/bigquery" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := bigquery.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Dataset("my_dataset").Tables(ctx) - for { - t, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(t) - } -} - -// [END bigquery_generated_bigquery_TableIterator_Next] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/CreateConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/CreateConnection/main.go index 977e82668f2..6d8dec9e075 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/CreateConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/CreateConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_CreateConnection] +// [START bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_CreateConnection] +// [END bigqueryconnection_v1_generated_ConnectionService_CreateConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/DeleteConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/DeleteConnection/main.go index 70fb499f247..e220f530da8 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/DeleteConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/DeleteConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_DeleteConnection] +// [START bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_DeleteConnection] +// [END bigqueryconnection_v1_generated_ConnectionService_DeleteConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/GetConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/GetConnection/main.go index 3f863908975..8322041e217 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/GetConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/GetConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_GetConnection] +// [START bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_GetConnection] +// [END bigqueryconnection_v1_generated_ConnectionService_GetConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/GetIamPolicy/main.go index 60953fb63dd..fd5c940d759 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_GetIamPolicy] +// [START bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_GetIamPolicy] +// [END bigqueryconnection_v1_generated_ConnectionService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/ListConnections/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/ListConnections/main.go index 1bad3c80be1..4a4e2d537f5 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/ListConnections/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/ListConnections/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_ListConnections] +// [START bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_ListConnections] +// [END bigqueryconnection_v1_generated_ConnectionService_ListConnections_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/NewClient/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/NewClient/main.go deleted file mode 100644 index 6c822eb35bc..00000000000 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigqueryconnection_generated_bigquery_connection_apiv1_NewClient] - -package main - -import ( - "context" - - connection "cloud.google.com/go/bigquery/connection/apiv1" -) - -func main() { - ctx := context.Background() - c, err := connection.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigqueryconnection_generated_bigquery_connection_apiv1_NewClient] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/SetIamPolicy/main.go index 0c1049d76cb..e3e1acb41fb 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_SetIamPolicy] +// [START bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_SetIamPolicy] +// [END bigqueryconnection_v1_generated_ConnectionService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/TestIamPermissions/main.go index d3bc03cccb7..a0ad4f894db 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_TestIamPermissions] +// [START bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_TestIamPermissions] +// [END bigqueryconnection_v1_generated_ConnectionService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1/Client/UpdateConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1/Client/UpdateConnection/main.go index e7e43a31e52..d03c2364f73 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1/Client/UpdateConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1/Client/UpdateConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1_Client_UpdateConnection] +// [START bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1_Client_UpdateConnection] +// [END bigqueryconnection_v1_generated_ConnectionService_UpdateConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/CreateConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/CreateConnection/main.go index d31e0dbba4a..df7fcc4c0b9 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/CreateConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/CreateConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_CreateConnection] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_CreateConnection_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_CreateConnection] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_CreateConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/DeleteConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/DeleteConnection/main.go index 1a5bbc7a171..11f35367242 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/DeleteConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/DeleteConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_DeleteConnection] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_DeleteConnection_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_DeleteConnection] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_DeleteConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetConnection/main.go index e4efa9e8b12..94d9ee0a1bc 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_GetConnection] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_GetConnection_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_GetConnection] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_GetConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetIamPolicy/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetIamPolicy/main.go index e8c54b85c63..b5cdb879f9a 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_GetIamPolicy] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_GetIamPolicy] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/ListConnections/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/ListConnections/main.go index 6bc6c6f272e..80ddcb6a99d 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/ListConnections/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/ListConnections/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_ListConnections] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_ListConnections_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_ListConnections] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_ListConnections_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 5fac66085fc..00000000000 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_NewClient] - -package main - -import ( - "context" - - connection "cloud.google.com/go/bigquery/connection/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := connection.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/SetIamPolicy/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/SetIamPolicy/main.go index df6691768e8..2e6cdd070b6 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_SetIamPolicy] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_SetIamPolicy] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/TestIamPermissions/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/TestIamPermissions/main.go index 24f9adc6235..48325facbdd 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_TestIamPermissions] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_TestIamPermissions] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnection/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnection/main.go index 308ef79f30d..c7274905ca8 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnection/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnection/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_UpdateConnection] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_UpdateConnection_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_UpdateConnection] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_UpdateConnection_sync] diff --git a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnectionCredential/main.go b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnectionCredential/main.go index 7fed8acdd6e..142e0cf32ad 100644 --- a/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnectionCredential/main.go +++ b/internal/generated/snippets/bigquery/connection/apiv1beta1/Client/UpdateConnectionCredential/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_UpdateConnectionCredential] +// [START bigqueryconnection_v1beta1_generated_ConnectionService_UpdateConnectionCredential_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryconnection_generated_bigquery_connection_apiv1beta1_Client_UpdateConnectionCredential] +// [END bigqueryconnection_v1beta1_generated_ConnectionService_UpdateConnectionCredential_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CheckValidCreds/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CheckValidCreds/main.go index b017c6d2284..0e94d06ba72 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CheckValidCreds/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CheckValidCreds/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_CheckValidCreds] +// [START bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_CheckValidCreds] +// [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CreateTransferConfig/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CreateTransferConfig/main.go index ea30c909d1d..3e4fcfbe8a8 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CreateTransferConfig/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/CreateTransferConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_CreateTransferConfig] +// [START bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_CreateTransferConfig] +// [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferConfig/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferConfig/main.go index 7dd5ef35f82..1ef786286ae 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferConfig/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_DeleteTransferConfig] +// [START bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_DeleteTransferConfig] +// [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferRun/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferRun/main.go index ed0b777856b..65c2a97a3ba 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferRun/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/DeleteTransferRun/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_DeleteTransferRun] +// [START bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_DeleteTransferRun] +// [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetDataSource/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetDataSource/main.go index 604d1cb5d22..a63aa1368d6 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetDataSource/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetDataSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_GetDataSource] +// [START bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_GetDataSource] +// [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferConfig/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferConfig/main.go index e07cc37f676..df9f1b96f19 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferConfig/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_GetTransferConfig] +// [START bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_GetTransferConfig] +// [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferRun/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferRun/main.go index 24256cb39f8..3b29f19bd2c 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferRun/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/GetTransferRun/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_GetTransferRun] +// [START bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_GetTransferRun] +// [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListDataSources/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListDataSources/main.go index c87541eb842..cf19e5876ef 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListDataSources/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListDataSources/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListDataSources] +// [START bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListDataSources] +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferConfigs/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferConfigs/main.go index 5ec4790bf1c..c278216f840 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferConfigs/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListTransferConfigs] +// [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListTransferConfigs] +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferLogs/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferLogs/main.go index 6cf6c2c260f..02aa5739798 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferLogs/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferLogs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListTransferLogs] +// [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListTransferLogs] +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferRuns/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferRuns/main.go index 554acf8b6e7..9d0eed155b0 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferRuns/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ListTransferRuns/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListTransferRuns] +// [START bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ListTransferRuns] +// [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/NewClient/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/NewClient/main.go deleted file mode 100644 index 32e46c3357a..00000000000 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_NewClient] - -package main - -import ( - "context" - - datatransfer "cloud.google.com/go/bigquery/datatransfer/apiv1" -) - -func main() { - ctx := context.Background() - c, err := datatransfer.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_NewClient] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ScheduleTransferRuns/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ScheduleTransferRuns/main.go index f1aae7e73c0..5f0dfcb0991 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ScheduleTransferRuns/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/ScheduleTransferRuns/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ScheduleTransferRuns] +// [START bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_ScheduleTransferRuns] +// [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/StartManualTransferRuns/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/StartManualTransferRuns/main.go index 26f722b1551..324b76652bb 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/StartManualTransferRuns/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/StartManualTransferRuns/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_StartManualTransferRuns] +// [START bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_StartManualTransferRuns] +// [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/UpdateTransferConfig/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/UpdateTransferConfig/main.go index 09085e037a9..dee3639664c 100644 --- a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/UpdateTransferConfig/main.go +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/UpdateTransferConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_UpdateTransferConfig] +// [START bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerydatatransfer_generated_bigquery_datatransfer_apiv1_Client_UpdateTransferConfig] +// [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateAssignment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateAssignment/main.go index 4d116ecbcc5..16a515a7282 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateAssignment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateAssignment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_CreateAssignment] +// [START bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_CreateAssignment] +// [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateCapacityCommitment/main.go index 142fe183e2d..cf88d1ec7b0 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_CreateCapacityCommitment] +// [START bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_CreateCapacityCommitment] +// [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateReservation/main.go index 9a02bbaaeb6..137bfeee57c 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/CreateReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_CreateReservation] +// [START bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_CreateReservation] +// [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteAssignment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteAssignment/main.go index 74753951140..18acdbcabd7 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteAssignment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteAssignment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_DeleteAssignment] +// [START bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_DeleteAssignment] +// [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteCapacityCommitment/main.go index ad21025f716..5981be6e8b7 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_DeleteCapacityCommitment] +// [START bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_DeleteCapacityCommitment] +// [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteReservation/main.go index 4118ce4328d..7b403d61f04 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/DeleteReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_DeleteReservation] +// [START bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_DeleteReservation] +// [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetBiReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetBiReservation/main.go index 1a3760499fc..4c44f2afd6e 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetBiReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetBiReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_GetBiReservation] +// [START bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_GetBiReservation] +// [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetCapacityCommitment/main.go index 58fe7bc7074..496e1972470 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_GetCapacityCommitment] +// [START bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_GetCapacityCommitment] +// [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetReservation/main.go index 60b478902c0..20992142f5e 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/GetReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_GetReservation] +// [START bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_GetReservation] +// [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListAssignments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListAssignments/main.go index 89b0a7fc915..b83710492fa 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListAssignments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListAssignments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_ListAssignments] +// [START bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_ListAssignments] +// [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListCapacityCommitments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListCapacityCommitments/main.go index 19dfdb56993..54b93777a41 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListCapacityCommitments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListCapacityCommitments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_ListCapacityCommitments] +// [START bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_ListCapacityCommitments] +// [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListReservations/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListReservations/main.go index f96becbe81a..1bb04875bdf 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListReservations/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/ListReservations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_ListReservations] +// [START bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_ListReservations] +// [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/MergeCapacityCommitments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/MergeCapacityCommitments/main.go index e247459757f..9bc18c96905 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/MergeCapacityCommitments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/MergeCapacityCommitments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_MergeCapacityCommitments] +// [START bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_MergeCapacityCommitments] +// [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/MoveAssignment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/MoveAssignment/main.go index f8d03b18805..d7347f2b17d 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/MoveAssignment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/MoveAssignment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_MoveAssignment] +// [START bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_MoveAssignment] +// [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/NewClient/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/NewClient/main.go deleted file mode 100644 index 857faf4b475..00000000000 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_NewClient] - -package main - -import ( - "context" - - reservation "cloud.google.com/go/bigquery/reservation/apiv1" -) - -func main() { - ctx := context.Background() - c, err := reservation.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_NewClient] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/SearchAssignments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/SearchAssignments/main.go index 53c7ea4dfa1..f6469cda1a4 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/SearchAssignments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/SearchAssignments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_SearchAssignments] +// [START bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_SearchAssignments] +// [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/SplitCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/SplitCapacityCommitment/main.go index 7f9ddbf9fbc..98cfa6acb35 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/SplitCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/SplitCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_SplitCapacityCommitment] +// [START bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_SplitCapacityCommitment] +// [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateBiReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateBiReservation/main.go index eaf46f0c220..3f5bb205dce 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateBiReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateBiReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_UpdateBiReservation] +// [START bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_UpdateBiReservation] +// [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateCapacityCommitment/main.go index 72ea1f18b55..7f361382b80 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_UpdateCapacityCommitment] +// [START bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_UpdateCapacityCommitment] +// [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateReservation/main.go index 3a53423369d..c64c8c104e6 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1/Client/UpdateReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1_Client_UpdateReservation] +// [START bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1_Client_UpdateReservation] +// [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateAssignment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateAssignment/main.go index e528bf7ea68..719c32bdb1f 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateAssignment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateAssignment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_CreateAssignment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_CreateAssignment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_CreateAssignment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_CreateAssignment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateCapacityCommitment/main.go index 5e26ad0581b..b7b11b548cc 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_CreateCapacityCommitment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_CreateCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_CreateCapacityCommitment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateReservation/main.go index b3a9d110377..f547ffa0932 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/CreateReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_CreateReservation] +// [START bigqueryreservation_v1beta1_generated_ReservationService_CreateReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_CreateReservation] +// [END bigqueryreservation_v1beta1_generated_ReservationService_CreateReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteAssignment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteAssignment/main.go index 37a0f12bd5b..d94957cfb00 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteAssignment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteAssignment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_DeleteAssignment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_DeleteAssignment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_DeleteAssignment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_DeleteAssignment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteCapacityCommitment/main.go index 2dd2b7e5e50..f4f6f32bf0a 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_DeleteCapacityCommitment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_DeleteCapacityCommitment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_DeleteCapacityCommitment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteReservation/main.go index 16bc73d4a81..306cae1526a 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/DeleteReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_DeleteReservation] +// [START bigqueryreservation_v1beta1_generated_ReservationService_DeleteReservation_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_DeleteReservation] +// [END bigqueryreservation_v1beta1_generated_ReservationService_DeleteReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetBiReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetBiReservation/main.go index 7f2da0a4950..6be1b8efc81 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetBiReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetBiReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_GetBiReservation] +// [START bigqueryreservation_v1beta1_generated_ReservationService_GetBiReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_GetBiReservation] +// [END bigqueryreservation_v1beta1_generated_ReservationService_GetBiReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetCapacityCommitment/main.go index 06490979ebb..4a7e540ed2b 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_GetCapacityCommitment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_GetCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_GetCapacityCommitment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetReservation/main.go index 81fb3ccee00..4b5cc42aa66 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/GetReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_GetReservation] +// [START bigqueryreservation_v1beta1_generated_ReservationService_GetReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_GetReservation] +// [END bigqueryreservation_v1beta1_generated_ReservationService_GetReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListAssignments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListAssignments/main.go index 49d916b2d3c..2ad627ae684 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListAssignments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListAssignments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_ListAssignments] +// [START bigqueryreservation_v1beta1_generated_ReservationService_ListAssignments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_ListAssignments] +// [END bigqueryreservation_v1beta1_generated_ReservationService_ListAssignments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListCapacityCommitments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListCapacityCommitments/main.go index 74279c7fce1..b650a402f80 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListCapacityCommitments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListCapacityCommitments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_ListCapacityCommitments] +// [START bigqueryreservation_v1beta1_generated_ReservationService_ListCapacityCommitments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_ListCapacityCommitments] +// [END bigqueryreservation_v1beta1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListReservations/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListReservations/main.go index c88f152192f..dd8ed48a63d 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListReservations/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/ListReservations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_ListReservations] +// [START bigqueryreservation_v1beta1_generated_ReservationService_ListReservations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_ListReservations] +// [END bigqueryreservation_v1beta1_generated_ReservationService_ListReservations_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MergeCapacityCommitments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MergeCapacityCommitments/main.go index 2ceb07d9d37..e0e317078f8 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MergeCapacityCommitments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MergeCapacityCommitments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_MergeCapacityCommitments] +// [START bigqueryreservation_v1beta1_generated_ReservationService_MergeCapacityCommitments_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_MergeCapacityCommitments] +// [END bigqueryreservation_v1beta1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MoveAssignment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MoveAssignment/main.go index 8e51faa2bf1..e1d684e999e 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MoveAssignment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/MoveAssignment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_MoveAssignment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_MoveAssignment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_MoveAssignment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_MoveAssignment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index ff1409576f5..00000000000 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_NewClient] - -package main - -import ( - "context" - - reservation "cloud.google.com/go/bigquery/reservation/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := reservation.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SearchAssignments/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SearchAssignments/main.go index fb44f0f5370..82a466a1c66 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SearchAssignments/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SearchAssignments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_SearchAssignments] +// [START bigqueryreservation_v1beta1_generated_ReservationService_SearchAssignments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_SearchAssignments] +// [END bigqueryreservation_v1beta1_generated_ReservationService_SearchAssignments_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SplitCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SplitCapacityCommitment/main.go index aff5ba6ea44..a73018e1d44 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SplitCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/SplitCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_SplitCapacityCommitment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_SplitCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_SplitCapacityCommitment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateBiReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateBiReservation/main.go index 9a99e26ba8b..a36a19dc7a2 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateBiReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateBiReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_UpdateBiReservation] +// [START bigqueryreservation_v1beta1_generated_ReservationService_UpdateBiReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_UpdateBiReservation] +// [END bigqueryreservation_v1beta1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateCapacityCommitment/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateCapacityCommitment/main.go index 4126fe33dbc..67e64bda57e 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateCapacityCommitment/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateCapacityCommitment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_UpdateCapacityCommitment] +// [START bigqueryreservation_v1beta1_generated_ReservationService_UpdateCapacityCommitment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_UpdateCapacityCommitment] +// [END bigqueryreservation_v1beta1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateReservation/main.go b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateReservation/main.go index 38fefda0354..da03446966a 100644 --- a/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateReservation/main.go +++ b/internal/generated/snippets/bigquery/reservation/apiv1beta1/Client/UpdateReservation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_UpdateReservation] +// [START bigqueryreservation_v1beta1_generated_ReservationService_UpdateReservation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigqueryreservation_generated_bigquery_reservation_apiv1beta1_Client_UpdateReservation] +// [END bigqueryreservation_v1beta1_generated_ReservationService_UpdateReservation_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/CreateReadSession/main.go b/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/CreateReadSession/main.go index adb791868b7..874c24d4201 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/CreateReadSession/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/CreateReadSession/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1_BigQueryReadClient_CreateReadSession] +// [START bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1_BigQueryReadClient_CreateReadSession] +// [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/NewBigQueryReadClient/main.go b/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/NewBigQueryReadClient/main.go deleted file mode 100644 index 08b38d8482f..00000000000 --- a/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/NewBigQueryReadClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquerystorage_generated_bigquery_storage_apiv1_NewBigQueryReadClient] - -package main - -import ( - "context" - - storage "cloud.google.com/go/bigquery/storage/apiv1" -) - -func main() { - ctx := context.Background() - c, err := storage.NewBigQueryReadClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigquerystorage_generated_bigquery_storage_apiv1_NewBigQueryReadClient] diff --git a/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/SplitReadStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/SplitReadStream/main.go index 22b7c5a02e7..a21835851be 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/SplitReadStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1/BigQueryReadClient/SplitReadStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1_BigQueryReadClient_SplitReadStream] +// [START bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1_BigQueryReadClient_SplitReadStream] +// [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/AppendRows/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/AppendRows/main.go index 8479131823a..44c08a84a39 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/AppendRows/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/AppendRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_AppendRows] +// [START bigquerystorage_v1alpha2_generated_BigQueryWrite_AppendRows_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_AppendRows] +// [END bigquerystorage_v1alpha2_generated_BigQueryWrite_AppendRows_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/BatchCommitWriteStreams/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/BatchCommitWriteStreams/main.go index 61f109d24ef..683c6c5cb06 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/BatchCommitWriteStreams/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/BatchCommitWriteStreams/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_BatchCommitWriteStreams] +// [START bigquerystorage_v1alpha2_generated_BigQueryWrite_BatchCommitWriteStreams_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_BatchCommitWriteStreams] +// [END bigquerystorage_v1alpha2_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/CreateWriteStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/CreateWriteStream/main.go index 5872cf23d8a..44c580f2e45 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/CreateWriteStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/CreateWriteStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_CreateWriteStream] +// [START bigquerystorage_v1alpha2_generated_BigQueryWrite_CreateWriteStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_CreateWriteStream] +// [END bigquerystorage_v1alpha2_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FinalizeWriteStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FinalizeWriteStream/main.go index b2f38d05df3..33d1665856a 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FinalizeWriteStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FinalizeWriteStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_FinalizeWriteStream] +// [START bigquerystorage_v1alpha2_generated_BigQueryWrite_FinalizeWriteStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_FinalizeWriteStream] +// [END bigquerystorage_v1alpha2_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FlushRows/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FlushRows/main.go index ffe0b472c19..0566a4a85cb 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FlushRows/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/FlushRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_FlushRows] +// [START bigquerystorage_v1alpha2_generated_BigQueryWrite_FlushRows_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_FlushRows] +// [END bigquerystorage_v1alpha2_generated_BigQueryWrite_FlushRows_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/GetWriteStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/GetWriteStream/main.go index d0d772d6c15..2fdda90d94e 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/GetWriteStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/GetWriteStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_GetWriteStream] +// [START bigquerystorage_v1alpha2_generated_BigQueryWrite_GetWriteStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_BigQueryWriteClient_GetWriteStream] +// [END bigquerystorage_v1alpha2_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/NewBigQueryWriteClient/main.go b/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/NewBigQueryWriteClient/main.go deleted file mode 100644 index 8388d97b615..00000000000 --- a/internal/generated/snippets/bigquery/storage/apiv1alpha2/BigQueryWriteClient/NewBigQueryWriteClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquerystorage_generated_bigquery_storage_apiv1alpha2_NewBigQueryWriteClient] - -package main - -import ( - "context" - - storage "cloud.google.com/go/bigquery/storage/apiv1alpha2" -) - -func main() { - ctx := context.Background() - c, err := storage.NewBigQueryWriteClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigquerystorage_generated_bigquery_storage_apiv1alpha2_NewBigQueryWriteClient] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/BatchCreateReadSessionStreams/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/BatchCreateReadSessionStreams/main.go index cfc22ae5d1f..6e9ef43aae9 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/BatchCreateReadSessionStreams/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/BatchCreateReadSessionStreams/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_BatchCreateReadSessionStreams] +// [START bigquerystorage_v1beta1_generated_BigQueryStorage_BatchCreateReadSessionStreams_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_BatchCreateReadSessionStreams] +// [END bigquerystorage_v1beta1_generated_BigQueryStorage_BatchCreateReadSessionStreams_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/CreateReadSession/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/CreateReadSession/main.go index 02376d40383..0264799daf5 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/CreateReadSession/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/CreateReadSession/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_CreateReadSession] +// [START bigquerystorage_v1beta1_generated_BigQueryStorage_CreateReadSession_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_CreateReadSession] +// [END bigquerystorage_v1beta1_generated_BigQueryStorage_CreateReadSession_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/FinalizeStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/FinalizeStream/main.go index d8d12462a36..1fff731fe46 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/FinalizeStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/FinalizeStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_FinalizeStream] +// [START bigquerystorage_v1beta1_generated_BigQueryStorage_FinalizeStream_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_FinalizeStream] +// [END bigquerystorage_v1beta1_generated_BigQueryStorage_FinalizeStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/NewBigQueryStorageClient/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/NewBigQueryStorageClient/main.go deleted file mode 100644 index c83942c167f..00000000000 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/NewBigQueryStorageClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquerystorage_generated_bigquery_storage_apiv1beta1_NewBigQueryStorageClient] - -package main - -import ( - "context" - - storage "cloud.google.com/go/bigquery/storage/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := storage.NewBigQueryStorageClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigquerystorage_generated_bigquery_storage_apiv1beta1_NewBigQueryStorageClient] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/SplitReadStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/SplitReadStream/main.go index 10b241954d1..1029bd4d9bc 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/SplitReadStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta1/BigQueryStorageClient/SplitReadStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_SplitReadStream] +// [START bigquerystorage_v1beta1_generated_BigQueryStorage_SplitReadStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta1_BigQueryStorageClient_SplitReadStream] +// [END bigquerystorage_v1beta1_generated_BigQueryStorage_SplitReadStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/CreateReadSession/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/CreateReadSession/main.go index 4109b715c12..53dac5ce020 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/CreateReadSession/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/CreateReadSession/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryReadClient_CreateReadSession] +// [START bigquerystorage_v1beta2_generated_BigQueryRead_CreateReadSession_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryReadClient_CreateReadSession] +// [END bigquerystorage_v1beta2_generated_BigQueryRead_CreateReadSession_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/NewBigQueryReadClient/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/NewBigQueryReadClient/main.go deleted file mode 100644 index f90b0525c57..00000000000 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/NewBigQueryReadClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_NewBigQueryReadClient] - -package main - -import ( - "context" - - storage "cloud.google.com/go/bigquery/storage/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := storage.NewBigQueryReadClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_NewBigQueryReadClient] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/SplitReadStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/SplitReadStream/main.go index 29d29061697..f7dd5513a19 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/SplitReadStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryReadClient/SplitReadStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryReadClient_SplitReadStream] +// [START bigquerystorage_v1beta2_generated_BigQueryRead_SplitReadStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryReadClient_SplitReadStream] +// [END bigquerystorage_v1beta2_generated_BigQueryRead_SplitReadStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/AppendRows/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/AppendRows/main.go index d2ef0b6714b..2d1b25d44e6 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/AppendRows/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/AppendRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_AppendRows] +// [START bigquerystorage_v1beta2_generated_BigQueryWrite_AppendRows_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_AppendRows] +// [END bigquerystorage_v1beta2_generated_BigQueryWrite_AppendRows_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/BatchCommitWriteStreams/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/BatchCommitWriteStreams/main.go index 2d577da10c9..5c81857e5c6 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/BatchCommitWriteStreams/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/BatchCommitWriteStreams/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_BatchCommitWriteStreams] +// [START bigquerystorage_v1beta2_generated_BigQueryWrite_BatchCommitWriteStreams_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_BatchCommitWriteStreams] +// [END bigquerystorage_v1beta2_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/CreateWriteStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/CreateWriteStream/main.go index b2e520a3e22..f76bf5dfd8e 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/CreateWriteStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/CreateWriteStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_CreateWriteStream] +// [START bigquerystorage_v1beta2_generated_BigQueryWrite_CreateWriteStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_CreateWriteStream] +// [END bigquerystorage_v1beta2_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FinalizeWriteStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FinalizeWriteStream/main.go index 4f82a3f5462..465bf16672f 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FinalizeWriteStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FinalizeWriteStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_FinalizeWriteStream] +// [START bigquerystorage_v1beta2_generated_BigQueryWrite_FinalizeWriteStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_FinalizeWriteStream] +// [END bigquerystorage_v1beta2_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FlushRows/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FlushRows/main.go index 5b58814bc79..7f119149459 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FlushRows/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/FlushRows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_FlushRows] +// [START bigquerystorage_v1beta2_generated_BigQueryWrite_FlushRows_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_FlushRows] +// [END bigquerystorage_v1beta2_generated_BigQueryWrite_FlushRows_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/GetWriteStream/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/GetWriteStream/main.go index 45c633157f3..a7c55e68a54 100644 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/GetWriteStream/main.go +++ b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/GetWriteStream/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_GetWriteStream] +// [START bigquerystorage_v1beta2_generated_BigQueryWrite_GetWriteStream_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_BigQueryWriteClient_GetWriteStream] +// [END bigquerystorage_v1beta2_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/NewBigQueryWriteClient/main.go b/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/NewBigQueryWriteClient/main.go deleted file mode 100644 index 07d45a249fa..00000000000 --- a/internal/generated/snippets/bigquery/storage/apiv1beta2/BigQueryWriteClient/NewBigQueryWriteClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigquerystorage_generated_bigquery_storage_apiv1beta2_NewBigQueryWriteClient] - -package main - -import ( - "context" - - storage "cloud.google.com/go/bigquery/storage/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := storage.NewBigQueryWriteClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END bigquerystorage_generated_bigquery_storage_apiv1beta2_NewBigQueryWriteClient] diff --git a/internal/generated/snippets/bigtable/bttest/Server/NewServer/main.go b/internal/generated/snippets/bigtable/bttest/Server/NewServer/main.go deleted file mode 100644 index 2eb1ae53cf8..00000000000 --- a/internal/generated/snippets/bigtable/bttest/Server/NewServer/main.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START bigtable_generated_bigtable_bttest_NewServer] - -package main - -import ( - "context" - "fmt" - "log" - - "cloud.google.com/go/bigtable" - "cloud.google.com/go/bigtable/bttest" - "google.golang.org/api/option" - "google.golang.org/grpc" -) - -func main() { - - srv, err := bttest.NewServer("localhost:0") - - if err != nil { - log.Fatalln(err) - } - - ctx := context.Background() - - conn, err := grpc.Dial(srv.Addr, grpc.WithInsecure()) - if err != nil { - log.Fatalln(err) - } - - proj, instance := "proj", "instance" - - adminClient, err := bigtable.NewAdminClient(ctx, proj, instance, option.WithGRPCConn(conn)) - if err != nil { - log.Fatalln(err) - } - - if err = adminClient.CreateTable(ctx, "example"); err != nil { - log.Fatalln(err) - } - - if err = adminClient.CreateColumnFamily(ctx, "example", "links"); err != nil { - log.Fatalln(err) - } - - client, err := bigtable.NewClient(ctx, proj, instance, option.WithGRPCConn(conn)) - if err != nil { - log.Fatalln(err) - } - tbl := client.Open("example") - - mut := bigtable.NewMutation() - mut.Set("links", "golang.org", bigtable.Now(), []byte("Gophers!")) - if err = tbl.Apply(ctx, "com.google.cloud", mut); err != nil { - log.Fatalln(err) - } - - if row, err := tbl.ReadRow(ctx, "com.google.cloud"); err != nil { - log.Fatalln(err) - } else { - for _, column := range row["links"] { - fmt.Println(column.Column) - fmt.Println(string(column.Value)) - } - } - -} - -// [END bigtable_generated_bigtable_bttest_NewServer] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/CreateBillingAccount/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/CreateBillingAccount/main.go index 757897ca923..3f0b3b0e949 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/CreateBillingAccount/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/CreateBillingAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_CreateBillingAccount] +// [START cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_CreateBillingAccount] +// [END cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetBillingAccount/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetBillingAccount/main.go index fab7e771ac7..bdc31e403ca 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetBillingAccount/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetBillingAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_GetBillingAccount] +// [START cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_GetBillingAccount] +// [END cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetIamPolicy/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetIamPolicy/main.go index effd70381c5..ce01cfa8628 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_GetIamPolicy] +// [START cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_GetIamPolicy] +// [END cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetProjectBillingInfo/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetProjectBillingInfo/main.go index 523afde1de9..b83a7cebcd2 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetProjectBillingInfo/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/GetProjectBillingInfo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_GetProjectBillingInfo] +// [START cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_GetProjectBillingInfo] +// [END cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListBillingAccounts/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListBillingAccounts/main.go index d97cc61922f..7f817b2b849 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListBillingAccounts/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListBillingAccounts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_ListBillingAccounts] +// [START cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_ListBillingAccounts] +// [END cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListProjectBillingInfo/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListProjectBillingInfo/main.go index a27231001bc..5bdb9e893be 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListProjectBillingInfo/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/ListProjectBillingInfo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_ListProjectBillingInfo] +// [START cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_ListProjectBillingInfo] +// [END cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/NewCloudBillingClient/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/NewCloudBillingClient/main.go deleted file mode 100644 index 8494b5b76fe..00000000000 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/NewCloudBillingClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudbilling_generated_billing_apiv1_NewCloudBillingClient] - -package main - -import ( - "context" - - billing "cloud.google.com/go/billing/apiv1" -) - -func main() { - ctx := context.Background() - c, err := billing.NewCloudBillingClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudbilling_generated_billing_apiv1_NewCloudBillingClient] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/SetIamPolicy/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/SetIamPolicy/main.go index ef7f02ef90d..6cf77ce44d9 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_SetIamPolicy] +// [START cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_SetIamPolicy] +// [END cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/TestIamPermissions/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/TestIamPermissions/main.go index 26485eb8b7b..eb53cfe5e82 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_TestIamPermissions] +// [START cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_TestIamPermissions] +// [END cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateBillingAccount/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateBillingAccount/main.go index e4cd67bf8b3..68576dcdaf8 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateBillingAccount/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateBillingAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_UpdateBillingAccount] +// [START cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_UpdateBillingAccount] +// [END cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateProjectBillingInfo/main.go b/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateProjectBillingInfo/main.go index f3033ae81d7..ddbfdcef891 100644 --- a/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateProjectBillingInfo/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudBillingClient/UpdateProjectBillingInfo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudBillingClient_UpdateProjectBillingInfo] +// [START cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbilling_generated_billing_apiv1_CloudBillingClient_UpdateProjectBillingInfo] +// [END cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListServices/main.go b/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListServices/main.go index c4d73611644..9aeaef1c842 100644 --- a/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListServices/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudCatalogClient_ListServices] +// [START cloudbilling_v1_generated_CloudCatalog_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudbilling_generated_billing_apiv1_CloudCatalogClient_ListServices] +// [END cloudbilling_v1_generated_CloudCatalog_ListServices_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListSkus/main.go b/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListSkus/main.go index 16adee12592..89bb0d99bae 100644 --- a/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListSkus/main.go +++ b/internal/generated/snippets/billing/apiv1/CloudCatalogClient/ListSkus/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbilling_generated_billing_apiv1_CloudCatalogClient_ListSkus] +// [START cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudbilling_generated_billing_apiv1_CloudCatalogClient_ListSkus] +// [END cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] diff --git a/internal/generated/snippets/billing/apiv1/CloudCatalogClient/NewCloudCatalogClient/main.go b/internal/generated/snippets/billing/apiv1/CloudCatalogClient/NewCloudCatalogClient/main.go deleted file mode 100644 index daa007a21d3..00000000000 --- a/internal/generated/snippets/billing/apiv1/CloudCatalogClient/NewCloudCatalogClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudbilling_generated_billing_apiv1_NewCloudCatalogClient] - -package main - -import ( - "context" - - billing "cloud.google.com/go/billing/apiv1" -) - -func main() { - ctx := context.Background() - c, err := billing.NewCloudCatalogClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudbilling_generated_billing_apiv1_NewCloudCatalogClient] diff --git a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/CreateBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/CreateBudget/main.go index b4604d3018c..309e73ab56e 100644 --- a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/CreateBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/CreateBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1_BudgetClient_CreateBudget] +// [START billingbudgets_v1_generated_BudgetService_CreateBudget_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END billingbudgets_generated_billing_budgets_apiv1_BudgetClient_CreateBudget] +// [END billingbudgets_v1_generated_BudgetService_CreateBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/DeleteBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/DeleteBudget/main.go index e0815aa378d..86cffc22bdd 100644 --- a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/DeleteBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/DeleteBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1_BudgetClient_DeleteBudget] +// [START billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END billingbudgets_generated_billing_budgets_apiv1_BudgetClient_DeleteBudget] +// [END billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/GetBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/GetBudget/main.go index 6ee7b982a73..bdaa1f0f7e3 100644 --- a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/GetBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/GetBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1_BudgetClient_GetBudget] +// [START billingbudgets_v1_generated_BudgetService_GetBudget_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END billingbudgets_generated_billing_budgets_apiv1_BudgetClient_GetBudget] +// [END billingbudgets_v1_generated_BudgetService_GetBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/ListBudgets/main.go b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/ListBudgets/main.go index b9544b2e1ca..649781cdb86 100644 --- a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/ListBudgets/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/ListBudgets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1_BudgetClient_ListBudgets] +// [START billingbudgets_v1_generated_BudgetService_ListBudgets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END billingbudgets_generated_billing_budgets_apiv1_BudgetClient_ListBudgets] +// [END billingbudgets_v1_generated_BudgetService_ListBudgets_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/NewBudgetClient/main.go b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/NewBudgetClient/main.go deleted file mode 100644 index 1010d8c2eb8..00000000000 --- a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/NewBudgetClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START billingbudgets_generated_billing_budgets_apiv1_NewBudgetClient] - -package main - -import ( - "context" - - budgets "cloud.google.com/go/billing/budgets/apiv1" -) - -func main() { - ctx := context.Background() - c, err := budgets.NewBudgetClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END billingbudgets_generated_billing_budgets_apiv1_NewBudgetClient] diff --git a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/UpdateBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/UpdateBudget/main.go index 4d2c97980fc..3d996b8cfc3 100644 --- a/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/UpdateBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1/BudgetClient/UpdateBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1_BudgetClient_UpdateBudget] +// [START billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END billingbudgets_generated_billing_budgets_apiv1_BudgetClient_UpdateBudget] +// [END billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/CreateBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/CreateBudget/main.go index 567e1040ae1..b28380bd0e8 100644 --- a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/CreateBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/CreateBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_CreateBudget] +// [START billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_CreateBudget] +// [END billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/DeleteBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/DeleteBudget/main.go index 5a4de348d45..722e82ab1e0 100644 --- a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/DeleteBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/DeleteBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_DeleteBudget] +// [START billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_DeleteBudget] +// [END billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/GetBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/GetBudget/main.go index 0929b18e444..02d6ecb1a6d 100644 --- a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/GetBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/GetBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_GetBudget] +// [START billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_GetBudget] +// [END billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/ListBudgets/main.go b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/ListBudgets/main.go index 4eca2c160df..9e2cf21db6d 100644 --- a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/ListBudgets/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/ListBudgets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_ListBudgets] +// [START billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_ListBudgets] +// [END billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync] diff --git a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/NewBudgetClient/main.go b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/NewBudgetClient/main.go deleted file mode 100644 index e004581bbcc..00000000000 --- a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/NewBudgetClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START billingbudgets_generated_billing_budgets_apiv1beta1_NewBudgetClient] - -package main - -import ( - "context" - - budgets "cloud.google.com/go/billing/budgets/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := budgets.NewBudgetClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END billingbudgets_generated_billing_budgets_apiv1beta1_NewBudgetClient] diff --git a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/UpdateBudget/main.go b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/UpdateBudget/main.go index 0edf2d464c0..ebd8ed28d10 100644 --- a/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/UpdateBudget/main.go +++ b/internal/generated/snippets/billing/budgets/apiv1beta1/BudgetClient/UpdateBudget/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_UpdateBudget] +// [START billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END billingbudgets_generated_billing_budgets_apiv1beta1_BudgetClient_UpdateBudget] +// [END billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/CreateAttestor/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/CreateAttestor/main.go index 9a4ffa74976..7105b35f889 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/CreateAttestor/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/CreateAttestor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_CreateAttestor] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_CreateAttestor] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/DeleteAttestor/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/DeleteAttestor/main.go index e1b695ac2d9..7df05a4e396 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/DeleteAttestor/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/DeleteAttestor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_DeleteAttestor] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_DeleteAttestor] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetAttestor/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetAttestor/main.go index c9fd6b2b319..97466646c80 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetAttestor/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetAttestor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_GetAttestor] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_GetAttestor] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetPolicy/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetPolicy/main.go index 267c12d4c48..6e2bcac4197 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetPolicy/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/GetPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_GetPolicy] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_GetPolicy] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/ListAttestors/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/ListAttestors/main.go index 0b7850f802f..00310b06c6f 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/ListAttestors/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/ListAttestors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_ListAttestors] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_ListAttestors] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/NewBinauthzManagementServiceV1Beta1Client/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/NewBinauthzManagementServiceV1Beta1Client/main.go deleted file mode 100644 index 2f45d7d0a7c..00000000000 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/NewBinauthzManagementServiceV1Beta1Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_NewBinauthzManagementServiceV1Beta1Client] - -package main - -import ( - "context" - - binaryauthorization "cloud.google.com/go/binaryauthorization/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := binaryauthorization.NewBinauthzManagementServiceV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_NewBinauthzManagementServiceV1Beta1Client] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdateAttestor/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdateAttestor/main.go index 4f5c937d705..ad0bb07dc8a 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdateAttestor/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdateAttestor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_UpdateAttestor] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_UpdateAttestor] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_sync] diff --git a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdatePolicy/main.go b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdatePolicy/main.go index d0c365c2859..c3519b3fc0e 100644 --- a/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdatePolicy/main.go +++ b/internal/generated/snippets/binaryauthorization/apiv1beta1/BinauthzManagementServiceV1Beta1Client/UpdatePolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_UpdatePolicy] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END binaryauthorization_generated_binaryauthorization_apiv1beta1_BinauthzManagementServiceV1Beta1Client_UpdatePolicy] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ActivateEntitlement/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ActivateEntitlement/main.go index ae050f55ec0..dab3548535a 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ActivateEntitlement/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ActivateEntitlement/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ActivateEntitlement] +// [START cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ActivateEntitlement] +// [END cloudchannel_v1_generated_CloudChannelService_ActivateEntitlement_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelEntitlement/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelEntitlement/main.go index 7dc12f673b6..2670c200a99 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelEntitlement/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CancelEntitlement/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_CancelEntitlement] +// [START cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_CancelEntitlement] +// [END cloudchannel_v1_generated_CloudChannelService_CancelEntitlement_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeOffer/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeOffer/main.go index 1d99191a99c..82f86fcdb90 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeOffer/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeOffer/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ChangeOffer] +// [START cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ChangeOffer] +// [END cloudchannel_v1_generated_CloudChannelService_ChangeOffer_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeParameters/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeParameters/main.go index e82eb9da4d5..ceda0c91316 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeParameters/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeParameters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ChangeParameters] +// [START cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ChangeParameters] +// [END cloudchannel_v1_generated_CloudChannelService_ChangeParameters_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeRenewalSettings/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeRenewalSettings/main.go index d0c5633030c..d6b14dd4461 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeRenewalSettings/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ChangeRenewalSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ChangeRenewalSettings] +// [START cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ChangeRenewalSettings] +// [END cloudchannel_v1_generated_CloudChannelService_ChangeRenewalSettings_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CheckCloudIdentityAccountsExist/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CheckCloudIdentityAccountsExist/main.go index f4a8bf112b3..9a568421141 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CheckCloudIdentityAccountsExist/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CheckCloudIdentityAccountsExist/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_CheckCloudIdentityAccountsExist] +// [START cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_CheckCloudIdentityAccountsExist] +// [END cloudchannel_v1_generated_CloudChannelService_CheckCloudIdentityAccountsExist_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateChannelPartnerLink/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateChannelPartnerLink/main.go index be359e43a7a..6f0b3d0ffbb 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateChannelPartnerLink/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateChannelPartnerLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_CreateChannelPartnerLink] +// [START cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_CreateChannelPartnerLink] +// [END cloudchannel_v1_generated_CloudChannelService_CreateChannelPartnerLink_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateCustomer/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateCustomer/main.go index fd606acbcfb..ba3cdd14328 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateCustomer/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateCustomer/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_CreateCustomer] +// [START cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_CreateCustomer] +// [END cloudchannel_v1_generated_CloudChannelService_CreateCustomer_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateEntitlement/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateEntitlement/main.go index be577056e6c..a5ba134f08a 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateEntitlement/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/CreateEntitlement/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_CreateEntitlement] +// [START cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_CreateEntitlement] +// [END cloudchannel_v1_generated_CloudChannelService_CreateEntitlement_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteCustomer/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteCustomer/main.go index 6b3e96ebcb6..198a15db350 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteCustomer/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/DeleteCustomer/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_DeleteCustomer] +// [START cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_DeleteCustomer] +// [END cloudchannel_v1_generated_CloudChannelService_DeleteCustomer_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetChannelPartnerLink/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetChannelPartnerLink/main.go index 30f83b0c9d9..2c2582c1524 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetChannelPartnerLink/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetChannelPartnerLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_GetChannelPartnerLink] +// [START cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_GetChannelPartnerLink] +// [END cloudchannel_v1_generated_CloudChannelService_GetChannelPartnerLink_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetCustomer/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetCustomer/main.go index ef2875d61f2..bdbebeba0f2 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetCustomer/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetCustomer/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_GetCustomer] +// [START cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_GetCustomer] +// [END cloudchannel_v1_generated_CloudChannelService_GetCustomer_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetEntitlement/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetEntitlement/main.go index dd51d645074..fad0a3b46e4 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetEntitlement/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/GetEntitlement/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_GetEntitlement] +// [START cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_GetEntitlement] +// [END cloudchannel_v1_generated_CloudChannelService_GetEntitlement_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListChannelPartnerLinks/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListChannelPartnerLinks/main.go index 1e1e8679b32..3e2c5e9114c 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListChannelPartnerLinks/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListChannelPartnerLinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListChannelPartnerLinks] +// [START cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListChannelPartnerLinks] +// [END cloudchannel_v1_generated_CloudChannelService_ListChannelPartnerLinks_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListCustomers/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListCustomers/main.go index bfefd595b75..3988a08f4bb 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListCustomers/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListCustomers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListCustomers] +// [START cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListCustomers] +// [END cloudchannel_v1_generated_CloudChannelService_ListCustomers_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListEntitlements/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListEntitlements/main.go index d2c130630fd..a799250ac97 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListEntitlements/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListEntitlements/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListEntitlements] +// [START cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListEntitlements] +// [END cloudchannel_v1_generated_CloudChannelService_ListEntitlements_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOffers/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOffers/main.go index 65dc313fc81..2dd513023cb 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOffers/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListOffers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListOffers] +// [START cloudchannel_v1_generated_CloudChannelService_ListOffers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListOffers] +// [END cloudchannel_v1_generated_CloudChannelService_ListOffers_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListProducts/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListProducts/main.go index 28a408f36d6..753f0e93c76 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListProducts/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListProducts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListProducts] +// [START cloudchannel_v1_generated_CloudChannelService_ListProducts_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListProducts] +// [END cloudchannel_v1_generated_CloudChannelService_ListProducts_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableOffers/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableOffers/main.go index 0bd75cf3d77..2c1b2b5cb12 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableOffers/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableOffers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListPurchasableOffers] +// [START cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListPurchasableOffers] +// [END cloudchannel_v1_generated_CloudChannelService_ListPurchasableOffers_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableSkus/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableSkus/main.go index aea9faeef3e..f3741d378d8 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableSkus/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListPurchasableSkus/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListPurchasableSkus] +// [START cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListPurchasableSkus] +// [END cloudchannel_v1_generated_CloudChannelService_ListPurchasableSkus_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSkus/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSkus/main.go index f3d0afd7eec..226ae5b0521 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSkus/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSkus/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListSkus] +// [START cloudchannel_v1_generated_CloudChannelService_ListSkus_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListSkus] +// [END cloudchannel_v1_generated_CloudChannelService_ListSkus_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSubscribers/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSubscribers/main.go index f3940264d61..236dcada726 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSubscribers/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListSubscribers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListSubscribers] +// [START cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListSubscribers] +// [END cloudchannel_v1_generated_CloudChannelService_ListSubscribers_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableOffers/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableOffers/main.go index c03bbffca35..6f0d61000df 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableOffers/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableOffers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListTransferableOffers] +// [START cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListTransferableOffers] +// [END cloudchannel_v1_generated_CloudChannelService_ListTransferableOffers_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableSkus/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableSkus/main.go index eafcc343d7f..587cdc4af5b 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableSkus/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ListTransferableSkus/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ListTransferableSkus] +// [START cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ListTransferableSkus] +// [END cloudchannel_v1_generated_CloudChannelService_ListTransferableSkus_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/NewCloudChannelClient/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/NewCloudChannelClient/main.go deleted file mode 100644 index 3f37733744c..00000000000 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/NewCloudChannelClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudchannel_generated_channel_apiv1_NewCloudChannelClient] - -package main - -import ( - "context" - - channel "cloud.google.com/go/channel/apiv1" -) - -func main() { - ctx := context.Background() - c, err := channel.NewCloudChannelClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudchannel_generated_channel_apiv1_NewCloudChannelClient] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ProvisionCloudIdentity/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ProvisionCloudIdentity/main.go index 8b876e87cb3..526dd88599e 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/ProvisionCloudIdentity/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/ProvisionCloudIdentity/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_ProvisionCloudIdentity] +// [START cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_ProvisionCloudIdentity] +// [END cloudchannel_v1_generated_CloudChannelService_ProvisionCloudIdentity_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/RegisterSubscriber/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/RegisterSubscriber/main.go index b4e7730f436..a148d20acd5 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/RegisterSubscriber/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/RegisterSubscriber/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_RegisterSubscriber] +// [START cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_RegisterSubscriber] +// [END cloudchannel_v1_generated_CloudChannelService_RegisterSubscriber_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/StartPaidService/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/StartPaidService/main.go index 3af8a5513ff..262bf5bf70d 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/StartPaidService/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/StartPaidService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_StartPaidService] +// [START cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_StartPaidService] +// [END cloudchannel_v1_generated_CloudChannelService_StartPaidService_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/SuspendEntitlement/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/SuspendEntitlement/main.go index ebcb773b82b..b996e83b447 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/SuspendEntitlement/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/SuspendEntitlement/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_SuspendEntitlement] +// [START cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_SuspendEntitlement] +// [END cloudchannel_v1_generated_CloudChannelService_SuspendEntitlement_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlements/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlements/main.go index ba319572de7..8a95a4df888 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlements/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlements/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_TransferEntitlements] +// [START cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_TransferEntitlements] +// [END cloudchannel_v1_generated_CloudChannelService_TransferEntitlements_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlementsToGoogle/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlementsToGoogle/main.go index 8818893e39f..e412482a8ac 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlementsToGoogle/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/TransferEntitlementsToGoogle/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_TransferEntitlementsToGoogle] +// [START cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_TransferEntitlementsToGoogle] +// [END cloudchannel_v1_generated_CloudChannelService_TransferEntitlementsToGoogle_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/UnregisterSubscriber/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/UnregisterSubscriber/main.go index ab6ac7eec42..0dc375c1808 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/UnregisterSubscriber/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/UnregisterSubscriber/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_UnregisterSubscriber] +// [START cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_UnregisterSubscriber] +// [END cloudchannel_v1_generated_CloudChannelService_UnregisterSubscriber_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateChannelPartnerLink/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateChannelPartnerLink/main.go index 03f35eaa785..16cd778d0c4 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateChannelPartnerLink/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateChannelPartnerLink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_UpdateChannelPartnerLink] +// [START cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_UpdateChannelPartnerLink] +// [END cloudchannel_v1_generated_CloudChannelService_UpdateChannelPartnerLink_sync] diff --git a/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateCustomer/main.go b/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateCustomer/main.go index e785d8598d1..41a68cc5097 100644 --- a/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateCustomer/main.go +++ b/internal/generated/snippets/channel/apiv1/CloudChannelClient/UpdateCustomer/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudchannel_generated_channel_apiv1_CloudChannelClient_UpdateCustomer] +// [START cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudchannel_generated_channel_apiv1_CloudChannelClient_UpdateCustomer] +// [END cloudchannel_v1_generated_CloudChannelService_UpdateCustomer_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CancelBuild/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CancelBuild/main.go index d05a9d115ec..c3c233ef07a 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CancelBuild/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CancelBuild/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_CancelBuild] +// [START cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_CancelBuild] +// [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuild/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuild/main.go index 1627181890f..5976abf4ff6 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuild/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuild/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_CreateBuild] +// [START cloudbuild_v1_generated_CloudBuild_CreateBuild_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_CreateBuild] +// [END cloudbuild_v1_generated_CloudBuild_CreateBuild_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuildTrigger/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuildTrigger/main.go index e3c31285ccf..601b4266162 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuildTrigger/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateBuildTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_CreateBuildTrigger] +// [START cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_CreateBuildTrigger] +// [END cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateWorkerPool/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateWorkerPool/main.go index f8de64474d5..1e707beb232 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateWorkerPool/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/CreateWorkerPool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_CreateWorkerPool] +// [START cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_CreateWorkerPool] +// [END cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteBuildTrigger/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteBuildTrigger/main.go index 0acb2689603..db9657b706e 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteBuildTrigger/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteBuildTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_DeleteBuildTrigger] +// [START cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_DeleteBuildTrigger] +// [END cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteWorkerPool/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteWorkerPool/main.go index 79784f7a413..e1499f252ad 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteWorkerPool/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/DeleteWorkerPool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_DeleteWorkerPool] +// [START cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_DeleteWorkerPool] +// [END cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuild/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuild/main.go index f4f73cceaa3..ca1dedd1545 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuild/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuild/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_GetBuild] +// [START cloudbuild_v1_generated_CloudBuild_GetBuild_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_GetBuild] +// [END cloudbuild_v1_generated_CloudBuild_GetBuild_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuildTrigger/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuildTrigger/main.go index 6e8caf88d7b..665d89c8806 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuildTrigger/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetBuildTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_GetBuildTrigger] +// [START cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_GetBuildTrigger] +// [END cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetWorkerPool/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetWorkerPool/main.go index c1ec6b35374..bc61c3cde3c 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetWorkerPool/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/GetWorkerPool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_GetWorkerPool] +// [START cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_GetWorkerPool] +// [END cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuildTriggers/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuildTriggers/main.go index 091731e3f38..f6d4c9a2871 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuildTriggers/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuildTriggers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_ListBuildTriggers] +// [START cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_ListBuildTriggers] +// [END cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuilds/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuilds/main.go index b453ce7492c..42ac2e14e60 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuilds/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListBuilds/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_ListBuilds] +// [START cloudbuild_v1_generated_CloudBuild_ListBuilds_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_ListBuilds] +// [END cloudbuild_v1_generated_CloudBuild_ListBuilds_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListWorkerPools/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListWorkerPools/main.go index 6b67ced5dd7..0a24c3fdc53 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListWorkerPools/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ListWorkerPools/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_ListWorkerPools] +// [START cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_ListWorkerPools] +// [END cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/NewClient/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/NewClient/main.go deleted file mode 100644 index 8f9116e13e6..00000000000 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudbuild_generated_cloudbuild_apiv1_v2_NewClient] - -package main - -import ( - "context" - - cloudbuild "cloud.google.com/go/cloudbuild/apiv1/v2" -) - -func main() { - ctx := context.Background() - c, err := cloudbuild.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudbuild_generated_cloudbuild_apiv1_v2_NewClient] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ReceiveTriggerWebhook/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ReceiveTriggerWebhook/main.go index 04d4f840246..59e1388eb77 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ReceiveTriggerWebhook/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/ReceiveTriggerWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_ReceiveTriggerWebhook] +// [START cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_ReceiveTriggerWebhook] +// [END cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RetryBuild/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RetryBuild/main.go index fc3593cad05..0c9663c9e2d 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RetryBuild/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RetryBuild/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_RetryBuild] +// [START cloudbuild_v1_generated_CloudBuild_RetryBuild_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_RetryBuild] +// [END cloudbuild_v1_generated_CloudBuild_RetryBuild_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RunBuildTrigger/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RunBuildTrigger/main.go index f20c9d54633..2a685c8e07e 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RunBuildTrigger/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/RunBuildTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_RunBuildTrigger] +// [START cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_RunBuildTrigger] +// [END cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateBuildTrigger/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateBuildTrigger/main.go index 5ef49ffb12b..ebb63b61b28 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateBuildTrigger/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateBuildTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_UpdateBuildTrigger] +// [START cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_UpdateBuildTrigger] +// [END cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync] diff --git a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateWorkerPool/main.go b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateWorkerPool/main.go index 3bcaf878728..2c20a16252c 100644 --- a/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateWorkerPool/main.go +++ b/internal/generated/snippets/cloudbuild/apiv1/v2/Client/UpdateWorkerPool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudbuild_generated_cloudbuild_apiv1_v2_Client_UpdateWorkerPool] +// [START cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudbuild_generated_cloudbuild_apiv1_v2_Client_UpdateWorkerPool] +// [END cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/CreateQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/CreateQueue/main.go index 6246957f7a1..a4437152a11 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/CreateQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/CreateQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_CreateQueue] +// [START cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_CreateQueue] +// [END cloudtasks_v2_generated_CloudTasks_CreateQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/CreateTask/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/CreateTask/main.go index ac16d638fbf..0a642dddffd 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/CreateTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/CreateTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_CreateTask] +// [START cloudtasks_v2_generated_CloudTasks_CreateTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_CreateTask] +// [END cloudtasks_v2_generated_CloudTasks_CreateTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteQueue/main.go index 6b74ba3c45b..a4fbf8157aa 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_DeleteQueue] +// [START cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_DeleteQueue] +// [END cloudtasks_v2_generated_CloudTasks_DeleteQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteTask/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteTask/main.go index a4263c65e0a..f6555c58f6d 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/DeleteTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_DeleteTask] +// [START cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_DeleteTask] +// [END cloudtasks_v2_generated_CloudTasks_DeleteTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/GetIamPolicy/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/GetIamPolicy/main.go index 667078891e9..3d348b16f11 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_GetIamPolicy] +// [START cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_GetIamPolicy] +// [END cloudtasks_v2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/GetQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/GetQueue/main.go index eb39a62fcba..689e9c8a925 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/GetQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/GetQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_GetQueue] +// [START cloudtasks_v2_generated_CloudTasks_GetQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_GetQueue] +// [END cloudtasks_v2_generated_CloudTasks_GetQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/GetTask/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/GetTask/main.go index 6bc7cc8a854..35cabd28fc6 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/GetTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/GetTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_GetTask] +// [START cloudtasks_v2_generated_CloudTasks_GetTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_GetTask] +// [END cloudtasks_v2_generated_CloudTasks_GetTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/ListQueues/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/ListQueues/main.go index 9e6d82bd799..560fc3194e0 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/ListQueues/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/ListQueues/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_ListQueues] +// [START cloudtasks_v2_generated_CloudTasks_ListQueues_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_ListQueues] +// [END cloudtasks_v2_generated_CloudTasks_ListQueues_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/ListTasks/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/ListTasks/main.go index c10a1aed1d9..f6570a6ea20 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/ListTasks/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/ListTasks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_ListTasks] +// [START cloudtasks_v2_generated_CloudTasks_ListTasks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_ListTasks] +// [END cloudtasks_v2_generated_CloudTasks_ListTasks_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/NewClient/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/NewClient/main.go deleted file mode 100644 index 8f87fec6787..00000000000 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudtasks_generated_cloudtasks_apiv2_NewClient] - -package main - -import ( - "context" - - cloudtasks "cloud.google.com/go/cloudtasks/apiv2" -) - -func main() { - ctx := context.Background() - c, err := cloudtasks.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudtasks_generated_cloudtasks_apiv2_NewClient] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/PauseQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/PauseQueue/main.go index b1ea6122d7d..cfaa7297c15 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/PauseQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/PauseQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_PauseQueue] +// [START cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_PauseQueue] +// [END cloudtasks_v2_generated_CloudTasks_PauseQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/PurgeQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/PurgeQueue/main.go index 416235245be..a6ae1503a50 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/PurgeQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/PurgeQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_PurgeQueue] +// [START cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_PurgeQueue] +// [END cloudtasks_v2_generated_CloudTasks_PurgeQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/ResumeQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/ResumeQueue/main.go index 659b48d28d3..5dff3597057 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/ResumeQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/ResumeQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_ResumeQueue] +// [START cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_ResumeQueue] +// [END cloudtasks_v2_generated_CloudTasks_ResumeQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/RunTask/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/RunTask/main.go index 3c58c5f82c2..8b0c788821e 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/RunTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/RunTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_RunTask] +// [START cloudtasks_v2_generated_CloudTasks_RunTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_RunTask] +// [END cloudtasks_v2_generated_CloudTasks_RunTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/SetIamPolicy/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/SetIamPolicy/main.go index 3dc80a1b0b6..c979bee6f9c 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_SetIamPolicy] +// [START cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_SetIamPolicy] +// [END cloudtasks_v2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/TestIamPermissions/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/TestIamPermissions/main.go index 545fc7ec781..3fb675bedb5 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_TestIamPermissions] +// [START cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_TestIamPermissions] +// [END cloudtasks_v2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2/Client/UpdateQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2/Client/UpdateQueue/main.go index 1b301d3f620..3585aefa0e0 100644 --- a/internal/generated/snippets/cloudtasks/apiv2/Client/UpdateQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2/Client/UpdateQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2_Client_UpdateQueue] +// [START cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2_Client_UpdateQueue] +// [END cloudtasks_v2_generated_CloudTasks_UpdateQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/AcknowledgeTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/AcknowledgeTask/main.go index 010f066fa96..49e03f4eb81 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/AcknowledgeTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/AcknowledgeTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_AcknowledgeTask] +// [START cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_AcknowledgeTask] +// [END cloudtasks_v2beta2_generated_CloudTasks_AcknowledgeTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CancelLease/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CancelLease/main.go index 9d75caf33c9..ff870ca8601 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CancelLease/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CancelLease/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_CancelLease] +// [START cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_CancelLease] +// [END cloudtasks_v2beta2_generated_CloudTasks_CancelLease_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateQueue/main.go index 1afd2396702..2ecf65cc15c 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_CreateQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_CreateQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_CreateQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateTask/main.go index f0b52cf7975..c35eb2dbf4b 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/CreateTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_CreateTask] +// [START cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_CreateTask] +// [END cloudtasks_v2beta2_generated_CloudTasks_CreateTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteQueue/main.go index 6a078614535..93b076e98f2 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_DeleteQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_DeleteQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_DeleteQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteTask/main.go index 262e062c157..eb155084e36 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/DeleteTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_DeleteTask] +// [START cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_DeleteTask] +// [END cloudtasks_v2beta2_generated_CloudTasks_DeleteTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetIamPolicy/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetIamPolicy/main.go index 44875fb2b28..e2d62d85fdc 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_GetIamPolicy] +// [START cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_GetIamPolicy] +// [END cloudtasks_v2beta2_generated_CloudTasks_GetIamPolicy_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetQueue/main.go index a67971c56e2..4a8466ae779 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_GetQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_GetQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_GetQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetTask/main.go index 7ba5d7f2132..7cbd2de9e1b 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/GetTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_GetTask] +// [START cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_GetTask] +// [END cloudtasks_v2beta2_generated_CloudTasks_GetTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/LeaseTasks/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/LeaseTasks/main.go index 8a9f7ee85e8..32a7f807665 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/LeaseTasks/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/LeaseTasks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_LeaseTasks] +// [START cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_LeaseTasks] +// [END cloudtasks_v2beta2_generated_CloudTasks_LeaseTasks_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListQueues/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListQueues/main.go index 0349fbeaeb6..ee25ba0d1e2 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListQueues/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListQueues/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_ListQueues] +// [START cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_ListQueues] +// [END cloudtasks_v2beta2_generated_CloudTasks_ListQueues_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListTasks/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListTasks/main.go index 3fbe65f257e..7942089f279 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListTasks/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ListTasks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_ListTasks] +// [START cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_ListTasks] +// [END cloudtasks_v2beta2_generated_CloudTasks_ListTasks_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/NewClient/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/NewClient/main.go deleted file mode 100644 index 8edeb737d25..00000000000 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudtasks_generated_cloudtasks_apiv2beta2_NewClient] - -package main - -import ( - "context" - - cloudtasks "cloud.google.com/go/cloudtasks/apiv2beta2" -) - -func main() { - ctx := context.Background() - c, err := cloudtasks.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudtasks_generated_cloudtasks_apiv2beta2_NewClient] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PauseQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PauseQueue/main.go index 4b529c62295..6f94730f169 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PauseQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PauseQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_PauseQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_PauseQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_PauseQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PurgeQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PurgeQueue/main.go index 04929d76c66..9d4083a618f 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PurgeQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/PurgeQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_PurgeQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_PurgeQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_PurgeQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RenewLease/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RenewLease/main.go index dae256a7145..0a79856ced8 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RenewLease/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RenewLease/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_RenewLease] +// [START cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_RenewLease] +// [END cloudtasks_v2beta2_generated_CloudTasks_RenewLease_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ResumeQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ResumeQueue/main.go index f146c50725b..f8298c6459e 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ResumeQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/ResumeQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_ResumeQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_ResumeQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_ResumeQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RunTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RunTask/main.go index 5ac81b2c4cd..b51c7d43eeb 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RunTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/RunTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_RunTask] +// [START cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_RunTask] +// [END cloudtasks_v2beta2_generated_CloudTasks_RunTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/SetIamPolicy/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/SetIamPolicy/main.go index 702327f3711..b521dbd8cc8 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_SetIamPolicy] +// [START cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_SetIamPolicy] +// [END cloudtasks_v2beta2_generated_CloudTasks_SetIamPolicy_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/TestIamPermissions/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/TestIamPermissions/main.go index 1feae87d67b..4b5a8cd8a44 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_TestIamPermissions] +// [START cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_TestIamPermissions] +// [END cloudtasks_v2beta2_generated_CloudTasks_TestIamPermissions_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/UpdateQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/UpdateQueue/main.go index 307f31a6f86..f774dd42e26 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta2/Client/UpdateQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta2/Client/UpdateQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta2_Client_UpdateQueue] +// [START cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta2_Client_UpdateQueue] +// [END cloudtasks_v2beta2_generated_CloudTasks_UpdateQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateQueue/main.go index 0ad9cc2e76d..8220d15fdd3 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_CreateQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_CreateQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_CreateQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateTask/main.go index 7eee5662a6a..c67f7f448de 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/CreateTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_CreateTask] +// [START cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_CreateTask] +// [END cloudtasks_v2beta3_generated_CloudTasks_CreateTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteQueue/main.go index 86af15d050e..5098d291af8 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_DeleteQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_DeleteQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_DeleteQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteTask/main.go index 371292decc5..b0477a85973 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/DeleteTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_DeleteTask] +// [START cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_DeleteTask] +// [END cloudtasks_v2beta3_generated_CloudTasks_DeleteTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetIamPolicy/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetIamPolicy/main.go index 56f49621de0..8d358fddcd6 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_GetIamPolicy] +// [START cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_GetIamPolicy] +// [END cloudtasks_v2beta3_generated_CloudTasks_GetIamPolicy_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetQueue/main.go index 128b31f2e52..4e7268d87eb 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_GetQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_GetQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_GetQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetTask/main.go index 3694011fbd9..5265a7fde23 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/GetTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_GetTask] +// [START cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_GetTask] +// [END cloudtasks_v2beta3_generated_CloudTasks_GetTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListQueues/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListQueues/main.go index 8a2e5f22a73..58bcd00bc9f 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListQueues/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListQueues/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_ListQueues] +// [START cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_ListQueues] +// [END cloudtasks_v2beta3_generated_CloudTasks_ListQueues_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListTasks/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListTasks/main.go index c59c31151e2..cf4b9f6a5c6 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListTasks/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ListTasks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_ListTasks] +// [START cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_ListTasks] +// [END cloudtasks_v2beta3_generated_CloudTasks_ListTasks_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/NewClient/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/NewClient/main.go deleted file mode 100644 index 99aed62cfce..00000000000 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudtasks_generated_cloudtasks_apiv2beta3_NewClient] - -package main - -import ( - "context" - - cloudtasks "cloud.google.com/go/cloudtasks/apiv2beta3" -) - -func main() { - ctx := context.Background() - c, err := cloudtasks.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudtasks_generated_cloudtasks_apiv2beta3_NewClient] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PauseQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PauseQueue/main.go index b85f3fcea85..2b67116d85d 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PauseQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PauseQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_PauseQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_PauseQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_PauseQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PurgeQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PurgeQueue/main.go index 3c842556c64..2d1f279800e 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PurgeQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/PurgeQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_PurgeQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_PurgeQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_PurgeQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ResumeQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ResumeQueue/main.go index f42dd2782bc..90ccfab354d 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ResumeQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/ResumeQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_ResumeQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_ResumeQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_ResumeQueue_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/RunTask/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/RunTask/main.go index afc85fdd62c..dcac56dd9e7 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/RunTask/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/RunTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_RunTask] +// [START cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_RunTask] +// [END cloudtasks_v2beta3_generated_CloudTasks_RunTask_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/SetIamPolicy/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/SetIamPolicy/main.go index ca5a2ba910d..192a3b4d9a1 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_SetIamPolicy] +// [START cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_SetIamPolicy] +// [END cloudtasks_v2beta3_generated_CloudTasks_SetIamPolicy_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/TestIamPermissions/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/TestIamPermissions/main.go index dab1034d9a9..dd7d0ca3c94 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_TestIamPermissions] +// [START cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_TestIamPermissions] +// [END cloudtasks_v2beta3_generated_CloudTasks_TestIamPermissions_sync] diff --git a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/UpdateQueue/main.go b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/UpdateQueue/main.go index b9ba6c788db..5576ff2b98a 100644 --- a/internal/generated/snippets/cloudtasks/apiv2beta3/Client/UpdateQueue/main.go +++ b/internal/generated/snippets/cloudtasks/apiv2beta3/Client/UpdateQueue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtasks_generated_cloudtasks_apiv2beta3_Client_UpdateQueue] +// [START cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtasks_generated_cloudtasks_apiv2beta3_Client_UpdateQueue] +// [END cloudtasks_v2beta3_generated_CloudTasks_UpdateQueue_sync] diff --git a/internal/generated/snippets/compute/metadata/Client/NewClient/main.go b/internal/generated/snippets/compute/metadata/Client/NewClient/main.go deleted file mode 100644 index f56088a9e98..00000000000 --- a/internal/generated/snippets/compute/metadata/Client/NewClient/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START compute_generated_compute_metadata_NewClient] - -package main - -import ( - "net/http" - - "cloud.google.com/go/compute/metadata" -) - -// This example demonstrates how to use your own transport when using this package. -func main() { - c := metadata.NewClient(&http.Client{Transport: userAgentTransport{ - userAgent: "my-user-agent", - base: http.DefaultTransport, - }}) - p, err := c.ProjectID() - if err != nil { - // TODO: Handle error. - } - _ = p // TODO: Use p. -} - -// userAgentTransport sets the User-Agent header before calling base. -type userAgentTransport struct { - userAgent string - base http.RoundTripper -} - -// RoundTrip implements the http.RoundTripper interface. -func (t userAgentTransport) RoundTrip(req *http.Request) (*http.Response, error) { - req.Header.Set("User-Agent", t.userAgent) - return t.base.RoundTrip(req) -} - -// [END compute_generated_compute_metadata_NewClient] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CancelOperation/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CancelOperation/main.go index b10f189cab2..f70b5899b74 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CancelOperation/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CancelOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_CancelOperation] +// [START container_v1_generated_ClusterManager_CancelOperation_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END container_generated_container_apiv1_ClusterManagerClient_CancelOperation] +// [END container_v1_generated_ClusterManager_CancelOperation_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CompleteIPRotation/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CompleteIPRotation/main.go index 2ad163b9334..739bcaa0d53 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CompleteIPRotation/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CompleteIPRotation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_CompleteIPRotation] +// [START container_v1_generated_ClusterManager_CompleteIPRotation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_CompleteIPRotation] +// [END container_v1_generated_ClusterManager_CompleteIPRotation_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateCluster/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateCluster/main.go index 5a6593af9a6..da4bf996347 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateCluster/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_CreateCluster] +// [START container_v1_generated_ClusterManager_CreateCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_CreateCluster] +// [END container_v1_generated_ClusterManager_CreateCluster_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateNodePool/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateNodePool/main.go index bc756ba6a49..fbd474d3412 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateNodePool/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/CreateNodePool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_CreateNodePool] +// [START container_v1_generated_ClusterManager_CreateNodePool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_CreateNodePool] +// [END container_v1_generated_ClusterManager_CreateNodePool_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteCluster/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteCluster/main.go index 659bc561b02..bf0bf5682bb 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteCluster/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_DeleteCluster] +// [START container_v1_generated_ClusterManager_DeleteCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_DeleteCluster] +// [END container_v1_generated_ClusterManager_DeleteCluster_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteNodePool/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteNodePool/main.go index 9860806fccc..19b628fd6b5 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteNodePool/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/DeleteNodePool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_DeleteNodePool] +// [START container_v1_generated_ClusterManager_DeleteNodePool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_DeleteNodePool] +// [END container_v1_generated_ClusterManager_DeleteNodePool_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetCluster/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetCluster/main.go index 2aa951f8ba6..2790c01b953 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetCluster/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_GetCluster] +// [START container_v1_generated_ClusterManager_GetCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_GetCluster] +// [END container_v1_generated_ClusterManager_GetCluster_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetJSONWebKeys/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetJSONWebKeys/main.go index 46a5e6227b3..03ff2ebc081 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetJSONWebKeys/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetJSONWebKeys/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_GetJSONWebKeys] +// [START container_v1_generated_ClusterManager_GetJSONWebKeys_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_GetJSONWebKeys] +// [END container_v1_generated_ClusterManager_GetJSONWebKeys_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetNodePool/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetNodePool/main.go index 5db7491efa6..8d8e7a4264a 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetNodePool/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetNodePool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_GetNodePool] +// [START container_v1_generated_ClusterManager_GetNodePool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_GetNodePool] +// [END container_v1_generated_ClusterManager_GetNodePool_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetOperation/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetOperation/main.go index e318d75ea9e..efcf2464275 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetOperation/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_GetOperation] +// [START container_v1_generated_ClusterManager_GetOperation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_GetOperation] +// [END container_v1_generated_ClusterManager_GetOperation_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetServerConfig/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetServerConfig/main.go index 92bde6e2ae5..a2fe4ad5200 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetServerConfig/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/GetServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_GetServerConfig] +// [START container_v1_generated_ClusterManager_GetServerConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_GetServerConfig] +// [END container_v1_generated_ClusterManager_GetServerConfig_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListClusters/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListClusters/main.go index 4683ae7cbad..599364cdd2e 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListClusters/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListClusters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_ListClusters] +// [START container_v1_generated_ClusterManager_ListClusters_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_ListClusters] +// [END container_v1_generated_ClusterManager_ListClusters_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListNodePools/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListNodePools/main.go index f69e1cd2534..05fe77730b5 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListNodePools/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListNodePools/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_ListNodePools] +// [START container_v1_generated_ClusterManager_ListNodePools_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_ListNodePools] +// [END container_v1_generated_ClusterManager_ListNodePools_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListOperations/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListOperations/main.go index 8648c02d1d8..ea180764675 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListOperations/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListOperations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_ListOperations] +// [START container_v1_generated_ClusterManager_ListOperations_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_ListOperations] +// [END container_v1_generated_ClusterManager_ListOperations_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListUsableSubnetworks/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListUsableSubnetworks/main.go index 9a0cedba271..bf071f641ee 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListUsableSubnetworks/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/ListUsableSubnetworks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_ListUsableSubnetworks] +// [START container_v1_generated_ClusterManager_ListUsableSubnetworks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END container_generated_container_apiv1_ClusterManagerClient_ListUsableSubnetworks] +// [END container_v1_generated_ClusterManager_ListUsableSubnetworks_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/NewClusterManagerClient/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/NewClusterManagerClient/main.go deleted file mode 100644 index c434b4aaa93..00000000000 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/NewClusterManagerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START container_generated_container_apiv1_NewClusterManagerClient] - -package main - -import ( - "context" - - container "cloud.google.com/go/container/apiv1" -) - -func main() { - ctx := context.Background() - c, err := container.NewClusterManagerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END container_generated_container_apiv1_NewClusterManagerClient] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/RollbackNodePoolUpgrade/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/RollbackNodePoolUpgrade/main.go index 9c890681408..6113829a4de 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/RollbackNodePoolUpgrade/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/RollbackNodePoolUpgrade/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_RollbackNodePoolUpgrade] +// [START container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_RollbackNodePoolUpgrade] +// [END container_v1_generated_ClusterManager_RollbackNodePoolUpgrade_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetAddonsConfig/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetAddonsConfig/main.go index a3c5751e4e2..5b7457ec7bb 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetAddonsConfig/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetAddonsConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetAddonsConfig] +// [START container_v1_generated_ClusterManager_SetAddonsConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetAddonsConfig] +// [END container_v1_generated_ClusterManager_SetAddonsConfig_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLabels/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLabels/main.go index 8f769d20137..d882b7d8f91 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLabels/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLabels/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetLabels] +// [START container_v1_generated_ClusterManager_SetLabels_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetLabels] +// [END container_v1_generated_ClusterManager_SetLabels_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLegacyAbac/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLegacyAbac/main.go index 22eb8463397..b377cee7fba 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLegacyAbac/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLegacyAbac/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetLegacyAbac] +// [START container_v1_generated_ClusterManager_SetLegacyAbac_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetLegacyAbac] +// [END container_v1_generated_ClusterManager_SetLegacyAbac_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLocations/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLocations/main.go index 011d973e6d3..52cdfa14478 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLocations/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLocations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetLocations] +// [START container_v1_generated_ClusterManager_SetLocations_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetLocations] +// [END container_v1_generated_ClusterManager_SetLocations_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLoggingService/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLoggingService/main.go index 67ed6d1ef06..23ba0b76a12 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLoggingService/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetLoggingService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetLoggingService] +// [START container_v1_generated_ClusterManager_SetLoggingService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetLoggingService] +// [END container_v1_generated_ClusterManager_SetLoggingService_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMaintenancePolicy/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMaintenancePolicy/main.go index a942ed66936..c62a980e25d 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMaintenancePolicy/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMaintenancePolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetMaintenancePolicy] +// [START container_v1_generated_ClusterManager_SetMaintenancePolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetMaintenancePolicy] +// [END container_v1_generated_ClusterManager_SetMaintenancePolicy_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMasterAuth/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMasterAuth/main.go index bf37f9e347d..b48163b2757 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMasterAuth/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMasterAuth/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetMasterAuth] +// [START container_v1_generated_ClusterManager_SetMasterAuth_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetMasterAuth] +// [END container_v1_generated_ClusterManager_SetMasterAuth_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMonitoringService/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMonitoringService/main.go index b89f272a32b..28a52fa3862 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMonitoringService/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetMonitoringService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetMonitoringService] +// [START container_v1_generated_ClusterManager_SetMonitoringService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetMonitoringService] +// [END container_v1_generated_ClusterManager_SetMonitoringService_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNetworkPolicy/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNetworkPolicy/main.go index aca94150e44..5d22c09425b 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNetworkPolicy/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNetworkPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetNetworkPolicy] +// [START container_v1_generated_ClusterManager_SetNetworkPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetNetworkPolicy] +// [END container_v1_generated_ClusterManager_SetNetworkPolicy_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolAutoscaling/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolAutoscaling/main.go index 46c0dfd31cc..be6f930bb88 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolAutoscaling/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolAutoscaling/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetNodePoolAutoscaling] +// [START container_v1_generated_ClusterManager_SetNodePoolAutoscaling_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetNodePoolAutoscaling] +// [END container_v1_generated_ClusterManager_SetNodePoolAutoscaling_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolManagement/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolManagement/main.go index 60123861c84..78fb775a147 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolManagement/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolManagement/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetNodePoolManagement] +// [START container_v1_generated_ClusterManager_SetNodePoolManagement_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetNodePoolManagement] +// [END container_v1_generated_ClusterManager_SetNodePoolManagement_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolSize/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolSize/main.go index 81b7004c81c..fe35ba8b293 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolSize/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/SetNodePoolSize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_SetNodePoolSize] +// [START container_v1_generated_ClusterManager_SetNodePoolSize_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_SetNodePoolSize] +// [END container_v1_generated_ClusterManager_SetNodePoolSize_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/StartIPRotation/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/StartIPRotation/main.go index 5b336d3cbcd..a2538e489e9 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/StartIPRotation/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/StartIPRotation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_StartIPRotation] +// [START container_v1_generated_ClusterManager_StartIPRotation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_StartIPRotation] +// [END container_v1_generated_ClusterManager_StartIPRotation_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateCluster/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateCluster/main.go index 862dcbcee8b..885f24402fe 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateCluster/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_UpdateCluster] +// [START container_v1_generated_ClusterManager_UpdateCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_UpdateCluster] +// [END container_v1_generated_ClusterManager_UpdateCluster_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateMaster/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateMaster/main.go index ccf48efbc03..5e2fdb56524 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateMaster/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateMaster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_UpdateMaster] +// [START container_v1_generated_ClusterManager_UpdateMaster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_UpdateMaster] +// [END container_v1_generated_ClusterManager_UpdateMaster_sync] diff --git a/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateNodePool/main.go b/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateNodePool/main.go index c52b21bab2e..f1689673051 100644 --- a/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateNodePool/main.go +++ b/internal/generated/snippets/container/apiv1/ClusterManagerClient/UpdateNodePool/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START container_generated_container_apiv1_ClusterManagerClient_UpdateNodePool] +// [START container_v1_generated_ClusterManager_UpdateNodePool_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END container_generated_container_apiv1_ClusterManagerClient_UpdateNodePool] +// [END container_v1_generated_ClusterManager_UpdateNodePool_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/GetIamPolicy/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/GetIamPolicy/main.go deleted file mode 100644 index 011c6c3006d..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/GetIamPolicy/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_GetIamPolicy] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" - iampb "google.golang.org/genproto/googleapis/iam/v1" -) - -func main() { - // import iampb "google.golang.org/genproto/googleapis/iam/v1" - - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &iampb.GetIamPolicyRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetIamPolicy(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_GetIamPolicy] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/GetScanConfig/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/GetScanConfig/main.go deleted file mode 100644 index 0c22d5ffd0a..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/GetScanConfig/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_GetScanConfig] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" - containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" -) - -func main() { - // import containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" - - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &containeranalysispb.GetScanConfigRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetScanConfig(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_GetScanConfig] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/ListScanConfigs/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/ListScanConfigs/main.go deleted file mode 100644 index 0af00a15e15..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/ListScanConfigs/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_ListScanConfigs] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" - "google.golang.org/api/iterator" - containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" -) - -func main() { - // import containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" - // import "google.golang.org/api/iterator" - - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &containeranalysispb.ListScanConfigsRequest{ - // TODO: Fill request struct fields. - } - it := c.ListScanConfigs(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_ListScanConfigs] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/NewContainerAnalysisV1Beta1Client/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/NewContainerAnalysisV1Beta1Client/main.go deleted file mode 100644 index 700a218b9c6..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/NewContainerAnalysisV1Beta1Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_NewContainerAnalysisV1Beta1Client] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_NewContainerAnalysisV1Beta1Client] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/SetIamPolicy/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/SetIamPolicy/main.go deleted file mode 100644 index eac34117da1..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/SetIamPolicy/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_SetIamPolicy] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" - iampb "google.golang.org/genproto/googleapis/iam/v1" -) - -func main() { - // import iampb "google.golang.org/genproto/googleapis/iam/v1" - - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &iampb.SetIamPolicyRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.SetIamPolicy(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_SetIamPolicy] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/TestIamPermissions/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/TestIamPermissions/main.go deleted file mode 100644 index c6ab11fb39b..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/TestIamPermissions/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_TestIamPermissions] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" - iampb "google.golang.org/genproto/googleapis/iam/v1" -) - -func main() { - // import iampb "google.golang.org/genproto/googleapis/iam/v1" - - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &iampb.TestIamPermissionsRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.TestIamPermissions(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_TestIamPermissions] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/UpdateScanConfig/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/UpdateScanConfig/main.go deleted file mode 100644 index 147fadca4cb..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/ContainerAnalysisV1Beta1Client/UpdateScanConfig/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_UpdateScanConfig] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" - containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" -) - -func main() { - // import containeranalysispb "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1beta1" - - ctx := context.Background() - c, err := containeranalysis.NewContainerAnalysisV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &containeranalysispb.UpdateScanConfigRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.UpdateScanConfig(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_ContainerAnalysisV1Beta1Client_UpdateScanConfig] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateNotes/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateNotes/main.go index 5776e573aa6..91c656b84d1 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateNotes/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateNotes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_BatchCreateNotes] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateNotes_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_BatchCreateNotes] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateNotes_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateOccurrences/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateOccurrences/main.go index 4d412d0172a..88b10fedd49 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateOccurrences/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/BatchCreateOccurrences/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_BatchCreateOccurrences] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateOccurrences_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_BatchCreateOccurrences] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateOccurrences_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateNote/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateNote/main.go index 9f40a9e9d87..79d19222942 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateNote/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateNote/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_CreateNote] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateNote_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_CreateNote] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateNote_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateOccurrence/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateOccurrence/main.go index 34a1401a477..2237a54d284 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateOccurrence/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/CreateOccurrence/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_CreateOccurrence] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateOccurrence_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_CreateOccurrence] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateOccurrence_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteNote/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteNote/main.go index b6ec4265cb1..d4af6d512a1 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteNote/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteNote/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_DeleteNote] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteNote_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_DeleteNote] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteNote_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteOccurrence/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteOccurrence/main.go index 48c4145e239..bb6faf7a25f 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteOccurrence/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/DeleteOccurrence/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_DeleteOccurrence] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteOccurrence_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_DeleteOccurrence] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteOccurrence_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetNote/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetNote/main.go index e1dadaa1f5a..6b974219c3e 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetNote/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetNote/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetNote] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetNote_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetNote] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetNote_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrence/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrence/main.go index 49d31f1c199..1bdfb9244b2 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrence/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrence/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetOccurrence] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetOccurrence] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrenceNote/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrenceNote/main.go index 5d0f7d11a61..b2a213ce0c6 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrenceNote/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetOccurrenceNote/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetOccurrenceNote] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrenceNote_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetOccurrenceNote] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrenceNote_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetVulnerabilityOccurrencesSummary/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetVulnerabilityOccurrencesSummary/main.go index 590e7681c1e..4e1b37480bd 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetVulnerabilityOccurrencesSummary/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/GetVulnerabilityOccurrencesSummary/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetVulnerabilityOccurrencesSummary] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_GetVulnerabilityOccurrencesSummary] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNoteOccurrences/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNoteOccurrences/main.go index 067849e278c..d9dfbf0457c 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNoteOccurrences/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNoteOccurrences/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_ListNoteOccurrences] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNoteOccurrences_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_ListNoteOccurrences] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNoteOccurrences_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNotes/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNotes/main.go index 26c663070d6..d4be57eaf75 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNotes/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListNotes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_ListNotes] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNotes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_ListNotes] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNotes_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListOccurrences/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListOccurrences/main.go index e96b1ee022d..c4a6c6aaf26 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListOccurrences/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/ListOccurrences/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_ListOccurrences] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListOccurrences_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_ListOccurrences] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListOccurrences_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/NewGrafeasV1Beta1Client/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/NewGrafeasV1Beta1Client/main.go deleted file mode 100644 index c4ab3f2d636..00000000000 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/NewGrafeasV1Beta1Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START containeranalysis_generated_containeranalysis_apiv1beta1_NewGrafeasV1Beta1Client] - -package main - -import ( - "context" - - containeranalysis "cloud.google.com/go/containeranalysis/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := containeranalysis.NewGrafeasV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END containeranalysis_generated_containeranalysis_apiv1beta1_NewGrafeasV1Beta1Client] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateNote/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateNote/main.go index a5d8ab931a8..271ddbaab54 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateNote/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateNote/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_UpdateNote] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateNote_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_UpdateNote] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateNote_sync] diff --git a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateOccurrence/main.go b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateOccurrence/main.go index 4ac14e02528..ac1e5518b53 100644 --- a/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateOccurrence/main.go +++ b/internal/generated/snippets/containeranalysis/apiv1beta1/GrafeasV1Beta1Client/UpdateOccurrence/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_UpdateOccurrence] +// [START containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateOccurrence_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END containeranalysis_generated_containeranalysis_apiv1beta1_GrafeasV1Beta1Client_UpdateOccurrence] +// [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateOccurrence_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntry/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntry/main.go index b79b059a328..a3c1dc906c6 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_CreateEntry] +// [START datacatalog_v1_generated_DataCatalog_CreateEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_CreateEntry] +// [END datacatalog_v1_generated_DataCatalog_CreateEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntryGroup/main.go index 22027aa076a..a5e4ffaba8c 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/CreateEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_CreateEntryGroup] +// [START datacatalog_v1_generated_DataCatalog_CreateEntryGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_CreateEntryGroup] +// [END datacatalog_v1_generated_DataCatalog_CreateEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/CreateTag/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/CreateTag/main.go index 95952ce96a3..e4365efdbdb 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/CreateTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/CreateTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_CreateTag] +// [START datacatalog_v1_generated_DataCatalog_CreateTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_CreateTag] +// [END datacatalog_v1_generated_DataCatalog_CreateTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplate/main.go index bbac610a23e..5ce2a175ec3 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_CreateTagTemplate] +// [START datacatalog_v1_generated_DataCatalog_CreateTagTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_CreateTagTemplate] +// [END datacatalog_v1_generated_DataCatalog_CreateTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplateField/main.go index 67190f5551a..176c1b0763f 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/CreateTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_CreateTagTemplateField] +// [START datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_CreateTagTemplateField] +// [END datacatalog_v1_generated_DataCatalog_CreateTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntry/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntry/main.go index 393483c0b18..f2c8b0dc073 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_DeleteEntry] +// [START datacatalog_v1_generated_DataCatalog_DeleteEntry_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_DeleteEntry] +// [END datacatalog_v1_generated_DataCatalog_DeleteEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntryGroup/main.go index a6d61aad123..797c6018a6c 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_DeleteEntryGroup] +// [START datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_DeleteEntryGroup] +// [END datacatalog_v1_generated_DataCatalog_DeleteEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTag/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTag/main.go index 2412b14fcd2..fe794d32d9e 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_DeleteTag] +// [START datacatalog_v1_generated_DataCatalog_DeleteTag_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_DeleteTag] +// [END datacatalog_v1_generated_DataCatalog_DeleteTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplate/main.go index e0d396df8df..b2c7b20eb76 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_DeleteTagTemplate] +// [START datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_DeleteTagTemplate] +// [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplateField/main.go index 6124ae2cd00..765f0174ed9 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/DeleteTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_DeleteTagTemplateField] +// [START datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_DeleteTagTemplateField] +// [END datacatalog_v1_generated_DataCatalog_DeleteTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/GetEntry/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/GetEntry/main.go index 65d69496109..19115e76e13 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/GetEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/GetEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_GetEntry] +// [START datacatalog_v1_generated_DataCatalog_GetEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_GetEntry] +// [END datacatalog_v1_generated_DataCatalog_GetEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/GetEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/GetEntryGroup/main.go index 0d35253924c..574aded9e4d 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/GetEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/GetEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_GetEntryGroup] +// [START datacatalog_v1_generated_DataCatalog_GetEntryGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_GetEntryGroup] +// [END datacatalog_v1_generated_DataCatalog_GetEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/GetIamPolicy/main.go index 24816d5c597..52d337d0fc7 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_GetIamPolicy] +// [START datacatalog_v1_generated_DataCatalog_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_GetIamPolicy] +// [END datacatalog_v1_generated_DataCatalog_GetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/GetTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/GetTagTemplate/main.go index 93feb4b686f..cb8e53630c7 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/GetTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/GetTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_GetTagTemplate] +// [START datacatalog_v1_generated_DataCatalog_GetTagTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_GetTagTemplate] +// [END datacatalog_v1_generated_DataCatalog_GetTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/ListEntries/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/ListEntries/main.go index 22a6a302a4a..712d024144f 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/ListEntries/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/ListEntries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_ListEntries] +// [START datacatalog_v1_generated_DataCatalog_ListEntries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_ListEntries] +// [END datacatalog_v1_generated_DataCatalog_ListEntries_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/ListEntryGroups/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/ListEntryGroups/main.go index 72b42449ba3..3ec9ccd78ba 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/ListEntryGroups/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/ListEntryGroups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_ListEntryGroups] +// [START datacatalog_v1_generated_DataCatalog_ListEntryGroups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_ListEntryGroups] +// [END datacatalog_v1_generated_DataCatalog_ListEntryGroups_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/ListTags/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/ListTags/main.go index a0c8654a872..bf1468b21d4 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/ListTags/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/ListTags/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_ListTags] +// [START datacatalog_v1_generated_DataCatalog_ListTags_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_ListTags] +// [END datacatalog_v1_generated_DataCatalog_ListTags_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/LookupEntry/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/LookupEntry/main.go index 8fa87ac2ef7..1d03f6e6ad7 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/LookupEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/LookupEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_LookupEntry] +// [START datacatalog_v1_generated_DataCatalog_LookupEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_LookupEntry] +// [END datacatalog_v1_generated_DataCatalog_LookupEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/NewClient/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/NewClient/main.go deleted file mode 100644 index 282e9ce7035..00000000000 --- a/internal/generated/snippets/datacatalog/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datacatalog_generated_datacatalog_apiv1_NewClient] - -package main - -import ( - "context" - - datacatalog "cloud.google.com/go/datacatalog/apiv1" -) - -func main() { - ctx := context.Background() - c, err := datacatalog.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datacatalog_generated_datacatalog_apiv1_NewClient] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateField/main.go index 1981009a353..f65a9316aac 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_RenameTagTemplateField] +// [START datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_RenameTagTemplateField] +// [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateFieldEnumValue/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateFieldEnumValue/main.go index 414f5998536..69d766781e6 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateFieldEnumValue/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/RenameTagTemplateFieldEnumValue/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_RenameTagTemplateFieldEnumValue] +// [START datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_RenameTagTemplateFieldEnumValue] +// [END datacatalog_v1_generated_DataCatalog_RenameTagTemplateFieldEnumValue_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/SearchCatalog/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/SearchCatalog/main.go index 43b4ecfd023..d9a4feedf47 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/SearchCatalog/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/SearchCatalog/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_SearchCatalog] +// [START datacatalog_v1_generated_DataCatalog_SearchCatalog_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_Client_SearchCatalog] +// [END datacatalog_v1_generated_DataCatalog_SearchCatalog_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/SetIamPolicy/main.go index ded4f4d95cc..8026f4e230d 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_SetIamPolicy] +// [START datacatalog_v1_generated_DataCatalog_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_SetIamPolicy] +// [END datacatalog_v1_generated_DataCatalog_SetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/TestIamPermissions/main.go index bca3f8fc128..3209fe81275 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_TestIamPermissions] +// [START datacatalog_v1_generated_DataCatalog_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_TestIamPermissions] +// [END datacatalog_v1_generated_DataCatalog_TestIamPermissions_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntry/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntry/main.go index c82b0b5978f..1951f8f9dcf 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_UpdateEntry] +// [START datacatalog_v1_generated_DataCatalog_UpdateEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_UpdateEntry] +// [END datacatalog_v1_generated_DataCatalog_UpdateEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntryGroup/main.go index 27c3baf2953..ea900462ef1 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_UpdateEntryGroup] +// [START datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_UpdateEntryGroup] +// [END datacatalog_v1_generated_DataCatalog_UpdateEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTag/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTag/main.go index 0321703d7a6..bb333fa164a 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_UpdateTag] +// [START datacatalog_v1_generated_DataCatalog_UpdateTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_UpdateTag] +// [END datacatalog_v1_generated_DataCatalog_UpdateTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplate/main.go index affe685289e..75051a4e4a8 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_UpdateTagTemplate] +// [START datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_UpdateTagTemplate] +// [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplateField/main.go index 5628fa8b13e..defef4c7e90 100644 --- a/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/Client/UpdateTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_Client_UpdateTagTemplateField] +// [START datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_Client_UpdateTagTemplateField] +// [END datacatalog_v1_generated_DataCatalog_UpdateTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreatePolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreatePolicyTag/main.go index 85e1d707445..0460a48db9b 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreatePolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreatePolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_CreatePolicyTag] +// [START datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_CreatePolicyTag] +// [END datacatalog_v1_generated_PolicyTagManager_CreatePolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreateTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreateTaxonomy/main.go index e5cf9c5421e..ebbb3bd95f2 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreateTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/CreateTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_CreateTaxonomy] +// [START datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_CreateTaxonomy] +// [END datacatalog_v1_generated_PolicyTagManager_CreateTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeletePolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeletePolicyTag/main.go index 1b652ffe227..1aa198055cd 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeletePolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeletePolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_DeletePolicyTag] +// [START datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_DeletePolicyTag] +// [END datacatalog_v1_generated_PolicyTagManager_DeletePolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeleteTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeleteTaxonomy/main.go index bc5f568d84b..87791c808a1 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeleteTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/DeleteTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_DeleteTaxonomy] +// [START datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_DeleteTaxonomy] +// [END datacatalog_v1_generated_PolicyTagManager_DeleteTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetIamPolicy/main.go index 8fc3006d48c..19614a0282f 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_GetIamPolicy] +// [START datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_GetIamPolicy] +// [END datacatalog_v1_generated_PolicyTagManager_GetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetPolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetPolicyTag/main.go index 1cfa600f538..c419bbbb687 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetPolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetPolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_GetPolicyTag] +// [START datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_GetPolicyTag] +// [END datacatalog_v1_generated_PolicyTagManager_GetPolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetTaxonomy/main.go index 1c1371f949c..d44d15d35f6 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/GetTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_GetTaxonomy] +// [START datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_GetTaxonomy] +// [END datacatalog_v1_generated_PolicyTagManager_GetTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListPolicyTags/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListPolicyTags/main.go index 77fe7192b11..78f50c137f7 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListPolicyTags/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListPolicyTags/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_ListPolicyTags] +// [START datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_ListPolicyTags] +// [END datacatalog_v1_generated_PolicyTagManager_ListPolicyTags_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListTaxonomies/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListTaxonomies/main.go index f26b02e0ae8..b882963dd23 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListTaxonomies/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/ListTaxonomies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_ListTaxonomies] +// [START datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_ListTaxonomies] +// [END datacatalog_v1_generated_PolicyTagManager_ListTaxonomies_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/NewPolicyTagManagerClient/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/NewPolicyTagManagerClient/main.go deleted file mode 100644 index 612271ae6e5..00000000000 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/NewPolicyTagManagerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datacatalog_generated_datacatalog_apiv1_NewPolicyTagManagerClient] - -package main - -import ( - "context" - - datacatalog "cloud.google.com/go/datacatalog/apiv1" -) - -func main() { - ctx := context.Background() - c, err := datacatalog.NewPolicyTagManagerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datacatalog_generated_datacatalog_apiv1_NewPolicyTagManagerClient] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/SetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/SetIamPolicy/main.go index f6c701d96f3..1042820c982 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_SetIamPolicy] +// [START datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_SetIamPolicy] +// [END datacatalog_v1_generated_PolicyTagManager_SetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/TestIamPermissions/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/TestIamPermissions/main.go index 15ef857c472..234c2d6ba62 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_TestIamPermissions] +// [START datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_TestIamPermissions] +// [END datacatalog_v1_generated_PolicyTagManager_TestIamPermissions_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdatePolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdatePolicyTag/main.go index a44d3da053f..46a86900c73 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdatePolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdatePolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_UpdatePolicyTag] +// [START datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_UpdatePolicyTag] +// [END datacatalog_v1_generated_PolicyTagManager_UpdatePolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdateTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdateTaxonomy/main.go index 0c287ee06dd..3188761d27d 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdateTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerClient/UpdateTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_UpdateTaxonomy] +// [START datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerClient_UpdateTaxonomy] +// [END datacatalog_v1_generated_PolicyTagManager_UpdateTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go index 876c3bcb703..d2e517f72c2 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerSerializationClient_ExportTaxonomies] +// [START datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerSerializationClient_ExportTaxonomies] +// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ExportTaxonomies_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go index b326fd1738a..a771b6d2ac0 100644 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go +++ b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1_PolicyTagManagerSerializationClient_ImportTaxonomies] +// [START datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1_PolicyTagManagerSerializationClient_ImportTaxonomies] +// [END datacatalog_v1_generated_PolicyTagManagerSerialization_ImportTaxonomies_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/NewPolicyTagManagerSerializationClient/main.go b/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/NewPolicyTagManagerSerializationClient/main.go deleted file mode 100644 index 9e5f8fa1789..00000000000 --- a/internal/generated/snippets/datacatalog/apiv1/PolicyTagManagerSerializationClient/NewPolicyTagManagerSerializationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datacatalog_generated_datacatalog_apiv1_NewPolicyTagManagerSerializationClient] - -package main - -import ( - "context" - - datacatalog "cloud.google.com/go/datacatalog/apiv1" -) - -func main() { - ctx := context.Background() - c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datacatalog_generated_datacatalog_apiv1_NewPolicyTagManagerSerializationClient] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntry/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntry/main.go index 131f8ca5a1e..611a2d0b855 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_CreateEntry] +// [START datacatalog_v1beta1_generated_DataCatalog_CreateEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_CreateEntry] +// [END datacatalog_v1beta1_generated_DataCatalog_CreateEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntryGroup/main.go index 4113ee0f2f5..aaeb05025d6 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_CreateEntryGroup] +// [START datacatalog_v1beta1_generated_DataCatalog_CreateEntryGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_CreateEntryGroup] +// [END datacatalog_v1beta1_generated_DataCatalog_CreateEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTag/main.go index 791bad0860c..8e102c2da88 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_CreateTag] +// [START datacatalog_v1beta1_generated_DataCatalog_CreateTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_CreateTag] +// [END datacatalog_v1beta1_generated_DataCatalog_CreateTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplate/main.go index 4e6f3db1674..766863b0062 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_CreateTagTemplate] +// [START datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_CreateTagTemplate] +// [END datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplateField/main.go index 938ce9a731f..d9fdacf4f9e 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/CreateTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_CreateTagTemplateField] +// [START datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplateField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_CreateTagTemplateField] +// [END datacatalog_v1beta1_generated_DataCatalog_CreateTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntry/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntry/main.go index 4fddedf9679..0c57c44272f 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteEntry] +// [START datacatalog_v1beta1_generated_DataCatalog_DeleteEntry_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteEntry] +// [END datacatalog_v1beta1_generated_DataCatalog_DeleteEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntryGroup/main.go index 2efbea6a08c..ad7ac0c5d47 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteEntryGroup] +// [START datacatalog_v1beta1_generated_DataCatalog_DeleteEntryGroup_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteEntryGroup] +// [END datacatalog_v1beta1_generated_DataCatalog_DeleteEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTag/main.go index c9b3b3835c5..eaee889ee42 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteTag] +// [START datacatalog_v1beta1_generated_DataCatalog_DeleteTag_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteTag] +// [END datacatalog_v1beta1_generated_DataCatalog_DeleteTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplate/main.go index 7071170c607..75a5bf30937 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteTagTemplate] +// [START datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteTagTemplate] +// [END datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplateField/main.go index 4c628d4549c..27c7e905597 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/DeleteTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteTagTemplateField] +// [START datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplateField_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_DeleteTagTemplateField] +// [END datacatalog_v1beta1_generated_DataCatalog_DeleteTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntry/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntry/main.go index 3c892271ed8..9d56c101faa 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_GetEntry] +// [START datacatalog_v1beta1_generated_DataCatalog_GetEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_GetEntry] +// [END datacatalog_v1beta1_generated_DataCatalog_GetEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntryGroup/main.go index 33fe382410b..7ce0befaaac 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_GetEntryGroup] +// [START datacatalog_v1beta1_generated_DataCatalog_GetEntryGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_GetEntryGroup] +// [END datacatalog_v1beta1_generated_DataCatalog_GetEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetIamPolicy/main.go index a3ab77e6477..11cb9328bf6 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_GetIamPolicy] +// [START datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_GetIamPolicy] +// [END datacatalog_v1beta1_generated_DataCatalog_GetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetTagTemplate/main.go index 8218d4f3c64..8bd493a2b69 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/GetTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_GetTagTemplate] +// [START datacatalog_v1beta1_generated_DataCatalog_GetTagTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_GetTagTemplate] +// [END datacatalog_v1beta1_generated_DataCatalog_GetTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntries/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntries/main.go index 144ad173f06..6dedcba3c5e 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntries/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_ListEntries] +// [START datacatalog_v1beta1_generated_DataCatalog_ListEntries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_ListEntries] +// [END datacatalog_v1beta1_generated_DataCatalog_ListEntries_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntryGroups/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntryGroups/main.go index 7e26ac70887..25ce077a3dc 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntryGroups/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListEntryGroups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_ListEntryGroups] +// [START datacatalog_v1beta1_generated_DataCatalog_ListEntryGroups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_ListEntryGroups] +// [END datacatalog_v1beta1_generated_DataCatalog_ListEntryGroups_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListTags/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListTags/main.go index 6e38e3397a5..9f281c3550f 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListTags/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/ListTags/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_ListTags] +// [START datacatalog_v1beta1_generated_DataCatalog_ListTags_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_ListTags] +// [END datacatalog_v1beta1_generated_DataCatalog_ListTags_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/LookupEntry/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/LookupEntry/main.go index fdd844cf01b..0dd34133b4b 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/LookupEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/LookupEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_LookupEntry] +// [START datacatalog_v1beta1_generated_DataCatalog_LookupEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_LookupEntry] +// [END datacatalog_v1beta1_generated_DataCatalog_LookupEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 9110eda7150..00000000000 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datacatalog_generated_datacatalog_apiv1beta1_NewClient] - -package main - -import ( - "context" - - datacatalog "cloud.google.com/go/datacatalog/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := datacatalog.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datacatalog_generated_datacatalog_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/RenameTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/RenameTagTemplateField/main.go index 64b3416545b..523f065a4b5 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/RenameTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/RenameTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_RenameTagTemplateField] +// [START datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_RenameTagTemplateField] +// [END datacatalog_v1beta1_generated_DataCatalog_RenameTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/SearchCatalog/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/SearchCatalog/main.go index d1d04ba2a22..9e4dfa47cd3 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/SearchCatalog/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/SearchCatalog/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_SearchCatalog] +// [START datacatalog_v1beta1_generated_DataCatalog_SearchCatalog_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_SearchCatalog] +// [END datacatalog_v1beta1_generated_DataCatalog_SearchCatalog_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/SetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/SetIamPolicy/main.go index 12de18c1236..c13cd4b763e 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_SetIamPolicy] +// [START datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_SetIamPolicy] +// [END datacatalog_v1beta1_generated_DataCatalog_SetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/TestIamPermissions/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/TestIamPermissions/main.go index 9538742dfca..136cddb1436 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_TestIamPermissions] +// [START datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_TestIamPermissions] +// [END datacatalog_v1beta1_generated_DataCatalog_TestIamPermissions_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntry/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntry/main.go index 126b0c9260c..8bbc857270a 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntry/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateEntry] +// [START datacatalog_v1beta1_generated_DataCatalog_UpdateEntry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateEntry] +// [END datacatalog_v1beta1_generated_DataCatalog_UpdateEntry_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntryGroup/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntryGroup/main.go index db190baef89..017d4bc9cc4 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntryGroup/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateEntryGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateEntryGroup] +// [START datacatalog_v1beta1_generated_DataCatalog_UpdateEntryGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateEntryGroup] +// [END datacatalog_v1beta1_generated_DataCatalog_UpdateEntryGroup_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTag/main.go index 428feaa15ca..32297eddeb2 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateTag] +// [START datacatalog_v1beta1_generated_DataCatalog_UpdateTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateTag] +// [END datacatalog_v1beta1_generated_DataCatalog_UpdateTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplate/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplate/main.go index c8d1d51b416..3548f370b31 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplate/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateTagTemplate] +// [START datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateTagTemplate] +// [END datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplate_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplateField/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplateField/main.go index 34da8398d54..eb3a757cc86 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplateField/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/Client/UpdateTagTemplateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateTagTemplateField] +// [START datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplateField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_Client_UpdateTagTemplateField] +// [END datacatalog_v1beta1_generated_DataCatalog_UpdateTagTemplateField_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreatePolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreatePolicyTag/main.go index ee56b9441b6..9d72ab9689e 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreatePolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreatePolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_CreatePolicyTag] +// [START datacatalog_v1beta1_generated_PolicyTagManager_CreatePolicyTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_CreatePolicyTag] +// [END datacatalog_v1beta1_generated_PolicyTagManager_CreatePolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreateTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreateTaxonomy/main.go index 15640d236d6..0979759d1dd 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreateTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/CreateTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_CreateTaxonomy] +// [START datacatalog_v1beta1_generated_PolicyTagManager_CreateTaxonomy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_CreateTaxonomy] +// [END datacatalog_v1beta1_generated_PolicyTagManager_CreateTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeletePolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeletePolicyTag/main.go index 05507f4bed2..9f7862c8e7e 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeletePolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeletePolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_DeletePolicyTag] +// [START datacatalog_v1beta1_generated_PolicyTagManager_DeletePolicyTag_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_DeletePolicyTag] +// [END datacatalog_v1beta1_generated_PolicyTagManager_DeletePolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeleteTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeleteTaxonomy/main.go index 31d13041358..f6aacb2842f 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeleteTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/DeleteTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_DeleteTaxonomy] +// [START datacatalog_v1beta1_generated_PolicyTagManager_DeleteTaxonomy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_DeleteTaxonomy] +// [END datacatalog_v1beta1_generated_PolicyTagManager_DeleteTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetIamPolicy/main.go index b311ee5bbde..1b37dea6e5c 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_GetIamPolicy] +// [START datacatalog_v1beta1_generated_PolicyTagManager_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_GetIamPolicy] +// [END datacatalog_v1beta1_generated_PolicyTagManager_GetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetPolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetPolicyTag/main.go index 33ce2a59785..94ca71d84b4 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetPolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetPolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_GetPolicyTag] +// [START datacatalog_v1beta1_generated_PolicyTagManager_GetPolicyTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_GetPolicyTag] +// [END datacatalog_v1beta1_generated_PolicyTagManager_GetPolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetTaxonomy/main.go index 62edb6a09a9..5ded5a8f04f 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/GetTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_GetTaxonomy] +// [START datacatalog_v1beta1_generated_PolicyTagManager_GetTaxonomy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_GetTaxonomy] +// [END datacatalog_v1beta1_generated_PolicyTagManager_GetTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListPolicyTags/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListPolicyTags/main.go index 3a199c5def8..fa402ab5c57 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListPolicyTags/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListPolicyTags/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_ListPolicyTags] +// [START datacatalog_v1beta1_generated_PolicyTagManager_ListPolicyTags_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_ListPolicyTags] +// [END datacatalog_v1beta1_generated_PolicyTagManager_ListPolicyTags_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListTaxonomies/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListTaxonomies/main.go index 863f94299bc..adf6e058f02 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListTaxonomies/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/ListTaxonomies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_ListTaxonomies] +// [START datacatalog_v1beta1_generated_PolicyTagManager_ListTaxonomies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_ListTaxonomies] +// [END datacatalog_v1beta1_generated_PolicyTagManager_ListTaxonomies_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/NewPolicyTagManagerClient/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/NewPolicyTagManagerClient/main.go deleted file mode 100644 index 44da7820041..00000000000 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/NewPolicyTagManagerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datacatalog_generated_datacatalog_apiv1beta1_NewPolicyTagManagerClient] - -package main - -import ( - "context" - - datacatalog "cloud.google.com/go/datacatalog/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := datacatalog.NewPolicyTagManagerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datacatalog_generated_datacatalog_apiv1beta1_NewPolicyTagManagerClient] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/SetIamPolicy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/SetIamPolicy/main.go index 9f66e6d7db2..9b96d3b2757 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_SetIamPolicy] +// [START datacatalog_v1beta1_generated_PolicyTagManager_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_SetIamPolicy] +// [END datacatalog_v1beta1_generated_PolicyTagManager_SetIamPolicy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/TestIamPermissions/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/TestIamPermissions/main.go index 37f541101f9..51d4717296e 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_TestIamPermissions] +// [START datacatalog_v1beta1_generated_PolicyTagManager_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_TestIamPermissions] +// [END datacatalog_v1beta1_generated_PolicyTagManager_TestIamPermissions_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdatePolicyTag/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdatePolicyTag/main.go index c7d50a4fd02..7cb18d02978 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdatePolicyTag/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdatePolicyTag/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_UpdatePolicyTag] +// [START datacatalog_v1beta1_generated_PolicyTagManager_UpdatePolicyTag_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_UpdatePolicyTag] +// [END datacatalog_v1beta1_generated_PolicyTagManager_UpdatePolicyTag_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdateTaxonomy/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdateTaxonomy/main.go index 79c110187bf..def78a9dd67 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdateTaxonomy/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerClient/UpdateTaxonomy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_UpdateTaxonomy] +// [START datacatalog_v1beta1_generated_PolicyTagManager_UpdateTaxonomy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerClient_UpdateTaxonomy] +// [END datacatalog_v1beta1_generated_PolicyTagManager_UpdateTaxonomy_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go index d636041e050..2286cc49d74 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ExportTaxonomies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerSerializationClient_ExportTaxonomies] +// [START datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ExportTaxonomies_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerSerializationClient_ExportTaxonomies] +// [END datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ExportTaxonomies_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go index 968a3c67e61..a5d1270c90b 100644 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go +++ b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/ImportTaxonomies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerSerializationClient_ImportTaxonomies] +// [START datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ImportTaxonomies_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datacatalog_generated_datacatalog_apiv1beta1_PolicyTagManagerSerializationClient_ImportTaxonomies] +// [END datacatalog_v1beta1_generated_PolicyTagManagerSerialization_ImportTaxonomies_sync] diff --git a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/NewPolicyTagManagerSerializationClient/main.go b/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/NewPolicyTagManagerSerializationClient/main.go deleted file mode 100644 index f96236413b3..00000000000 --- a/internal/generated/snippets/datacatalog/apiv1beta1/PolicyTagManagerSerializationClient/NewPolicyTagManagerSerializationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datacatalog_generated_datacatalog_apiv1beta1_NewPolicyTagManagerSerializationClient] - -package main - -import ( - "context" - - datacatalog "cloud.google.com/go/datacatalog/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := datacatalog.NewPolicyTagManagerSerializationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datacatalog_generated_datacatalog_apiv1beta1_NewPolicyTagManagerSerializationClient] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateAnnotationSpecSet/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateAnnotationSpecSet/main.go index b7dd42b48a5..d8922650ee7 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateAnnotationSpecSet/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateAnnotationSpecSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_CreateAnnotationSpecSet] +// [START datalabeling_v1beta1_generated_DataLabelingService_CreateAnnotationSpecSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_CreateAnnotationSpecSet] +// [END datalabeling_v1beta1_generated_DataLabelingService_CreateAnnotationSpecSet_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateDataset/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateDataset/main.go index 1f6d1b5df6e..4f65de48ca2 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateDataset/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_CreateDataset] +// [START datalabeling_v1beta1_generated_DataLabelingService_CreateDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_CreateDataset] +// [END datalabeling_v1beta1_generated_DataLabelingService_CreateDataset_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateEvaluationJob/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateEvaluationJob/main.go index ab5bd7900f8..356e4d2e418 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateEvaluationJob/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateEvaluationJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_CreateEvaluationJob] +// [START datalabeling_v1beta1_generated_DataLabelingService_CreateEvaluationJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_CreateEvaluationJob] +// [END datalabeling_v1beta1_generated_DataLabelingService_CreateEvaluationJob_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateInstruction/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateInstruction/main.go index 0ab1e09cbaa..e040495cf8c 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateInstruction/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/CreateInstruction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_CreateInstruction] +// [START datalabeling_v1beta1_generated_DataLabelingService_CreateInstruction_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_CreateInstruction] +// [END datalabeling_v1beta1_generated_DataLabelingService_CreateInstruction_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotatedDataset/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotatedDataset/main.go index 91465353b68..a23ca5a08d5 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotatedDataset/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotatedDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteAnnotatedDataset] +// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotatedDataset_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteAnnotatedDataset] +// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotatedDataset_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotationSpecSet/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotationSpecSet/main.go index 7700c141dad..db56f9a43b3 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotationSpecSet/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteAnnotationSpecSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteAnnotationSpecSet] +// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotationSpecSet_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteAnnotationSpecSet] +// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteAnnotationSpecSet_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteDataset/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteDataset/main.go index 0be1bd5e981..99504698904 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteDataset/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteDataset] +// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteDataset_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteDataset] +// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteDataset_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteEvaluationJob/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteEvaluationJob/main.go index 293ba77c207..a19247ea8b6 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteEvaluationJob/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteEvaluationJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteEvaluationJob] +// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteEvaluationJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteEvaluationJob] +// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteEvaluationJob_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteInstruction/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteInstruction/main.go index c7466b21529..5f86c6894d1 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteInstruction/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/DeleteInstruction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteInstruction] +// [START datalabeling_v1beta1_generated_DataLabelingService_DeleteInstruction_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_DeleteInstruction] +// [END datalabeling_v1beta1_generated_DataLabelingService_DeleteInstruction_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ExportData/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ExportData/main.go index 685ad16e25c..5091e44b6b6 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ExportData/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ExportData/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ExportData] +// [START datalabeling_v1beta1_generated_DataLabelingService_ExportData_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ExportData] +// [END datalabeling_v1beta1_generated_DataLabelingService_ExportData_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotatedDataset/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotatedDataset/main.go index 3e49ab67d1b..f8c57aeb2ea 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotatedDataset/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotatedDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetAnnotatedDataset] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetAnnotatedDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetAnnotatedDataset] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetAnnotatedDataset_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotationSpecSet/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotationSpecSet/main.go index 2da569cf7ae..c11b642ef12 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotationSpecSet/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetAnnotationSpecSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetAnnotationSpecSet] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetAnnotationSpecSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetAnnotationSpecSet] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetAnnotationSpecSet_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataItem/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataItem/main.go index d718e109857..aa62c3638e1 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataItem/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataItem/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetDataItem] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetDataItem_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetDataItem] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetDataItem_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataset/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataset/main.go index d15e7b9f49c..05552a552a2 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataset/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetDataset/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetDataset] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetDataset_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetDataset] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetDataset_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluation/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluation/main.go index 7f18690a33d..bcc8b6b5631 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluation/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetEvaluation] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetEvaluation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetEvaluation] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetEvaluation_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluationJob/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluationJob/main.go index 92de778f8d9..2d02e47b98c 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluationJob/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetEvaluationJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetEvaluationJob] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetEvaluationJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetEvaluationJob] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetEvaluationJob_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetExample/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetExample/main.go index 061121792e9..5c1e8664e84 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetExample/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetExample/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetExample] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetExample_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetExample] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetExample_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetInstruction/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetInstruction/main.go index a090428c324..7a710e99d1f 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetInstruction/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/GetInstruction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_GetInstruction] +// [START datalabeling_v1beta1_generated_DataLabelingService_GetInstruction_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_GetInstruction] +// [END datalabeling_v1beta1_generated_DataLabelingService_GetInstruction_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ImportData/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ImportData/main.go index ee43877604e..4a8097df55e 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ImportData/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ImportData/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ImportData] +// [START datalabeling_v1beta1_generated_DataLabelingService_ImportData_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ImportData] +// [END datalabeling_v1beta1_generated_DataLabelingService_ImportData_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelImage/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelImage/main.go index 56261d06285..ecf130ce769 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelImage/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelImage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_LabelImage] +// [START datalabeling_v1beta1_generated_DataLabelingService_LabelImage_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_LabelImage] +// [END datalabeling_v1beta1_generated_DataLabelingService_LabelImage_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelText/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelText/main.go index 376b32a3ded..70eb8bbc75d 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelText/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_LabelText] +// [START datalabeling_v1beta1_generated_DataLabelingService_LabelText_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_LabelText] +// [END datalabeling_v1beta1_generated_DataLabelingService_LabelText_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelVideo/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelVideo/main.go index c95ce0cd48b..4615af65d9c 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelVideo/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/LabelVideo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_LabelVideo] +// [START datalabeling_v1beta1_generated_DataLabelingService_LabelVideo_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_LabelVideo] +// [END datalabeling_v1beta1_generated_DataLabelingService_LabelVideo_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotatedDatasets/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotatedDatasets/main.go index 98f628bb9a7..cb74b708add 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotatedDatasets/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotatedDatasets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListAnnotatedDatasets] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListAnnotatedDatasets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListAnnotatedDatasets] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListAnnotatedDatasets_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotationSpecSets/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotationSpecSets/main.go index 3b96a6ab666..03c4be87f5b 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotationSpecSets/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListAnnotationSpecSets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListAnnotationSpecSets] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListAnnotationSpecSets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListAnnotationSpecSets] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListAnnotationSpecSets_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDataItems/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDataItems/main.go index 50b1bb8772a..eebde4cc8f2 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDataItems/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDataItems/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListDataItems] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListDataItems_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListDataItems] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListDataItems_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDatasets/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDatasets/main.go index 77a2680fd41..29a39a69046 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDatasets/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListDatasets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListDatasets] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListDatasets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListDatasets] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListDatasets_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListEvaluationJobs/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListEvaluationJobs/main.go index 711271b4187..38bd598da64 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListEvaluationJobs/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListEvaluationJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListEvaluationJobs] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListEvaluationJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListEvaluationJobs] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListEvaluationJobs_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListExamples/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListExamples/main.go index 4f4ef747e5a..bbcfd75508f 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListExamples/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListExamples/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListExamples] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListExamples_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListExamples] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListExamples_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListInstructions/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListInstructions/main.go index 48ae6e5a954..5ad680ac69f 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListInstructions/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ListInstructions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ListInstructions] +// [START datalabeling_v1beta1_generated_DataLabelingService_ListInstructions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ListInstructions] +// [END datalabeling_v1beta1_generated_DataLabelingService_ListInstructions_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 4db8b3cf3c6..00000000000 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datalabeling_generated_datalabeling_apiv1beta1_NewClient] - -package main - -import ( - "context" - - datalabeling "cloud.google.com/go/datalabeling/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := datalabeling.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datalabeling_generated_datalabeling_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/PauseEvaluationJob/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/PauseEvaluationJob/main.go index cb091c84115..dc0f4ef37e7 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/PauseEvaluationJob/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/PauseEvaluationJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_PauseEvaluationJob] +// [START datalabeling_v1beta1_generated_DataLabelingService_PauseEvaluationJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_PauseEvaluationJob] +// [END datalabeling_v1beta1_generated_DataLabelingService_PauseEvaluationJob_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ResumeEvaluationJob/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ResumeEvaluationJob/main.go index 72fbf9aefc4..b5d118f5e36 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/ResumeEvaluationJob/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/ResumeEvaluationJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_ResumeEvaluationJob] +// [START datalabeling_v1beta1_generated_DataLabelingService_ResumeEvaluationJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_ResumeEvaluationJob] +// [END datalabeling_v1beta1_generated_DataLabelingService_ResumeEvaluationJob_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchEvaluations/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchEvaluations/main.go index f0abddd196a..9f7fdc6e167 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchEvaluations/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchEvaluations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_SearchEvaluations] +// [START datalabeling_v1beta1_generated_DataLabelingService_SearchEvaluations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_SearchEvaluations] +// [END datalabeling_v1beta1_generated_DataLabelingService_SearchEvaluations_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchExampleComparisons/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchExampleComparisons/main.go index 41dcf4a4a5f..7a95811745d 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchExampleComparisons/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/SearchExampleComparisons/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_SearchExampleComparisons] +// [START datalabeling_v1beta1_generated_DataLabelingService_SearchExampleComparisons_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_SearchExampleComparisons] +// [END datalabeling_v1beta1_generated_DataLabelingService_SearchExampleComparisons_sync] diff --git a/internal/generated/snippets/datalabeling/apiv1beta1/Client/UpdateEvaluationJob/main.go b/internal/generated/snippets/datalabeling/apiv1beta1/Client/UpdateEvaluationJob/main.go index 6f912ede399..a6556720c1b 100644 --- a/internal/generated/snippets/datalabeling/apiv1beta1/Client/UpdateEvaluationJob/main.go +++ b/internal/generated/snippets/datalabeling/apiv1beta1/Client/UpdateEvaluationJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datalabeling_generated_datalabeling_apiv1beta1_Client_UpdateEvaluationJob] +// [START datalabeling_v1beta1_generated_DataLabelingService_UpdateEvaluationJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datalabeling_generated_datalabeling_apiv1beta1_Client_UpdateEvaluationJob] +// [END datalabeling_v1beta1_generated_DataLabelingService_UpdateEvaluationJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go index 7627b446d1b..bf7f8bef21e 100644 --- a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_CreateAutoscalingPolicy] +// [START dataproc_v1_generated_AutoscalingPolicyService_CreateAutoscalingPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_CreateAutoscalingPolicy] +// [END dataproc_v1_generated_AutoscalingPolicyService_CreateAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go index f04d7a2dfe1..3287e9618c6 100644 --- a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_DeleteAutoscalingPolicy] +// [START dataproc_v1_generated_AutoscalingPolicyService_DeleteAutoscalingPolicy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_DeleteAutoscalingPolicy] +// [END dataproc_v1_generated_AutoscalingPolicyService_DeleteAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go index ab80a301bdb..d4fdf2341ed 100644 --- a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_GetAutoscalingPolicy] +// [START dataproc_v1_generated_AutoscalingPolicyService_GetAutoscalingPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_GetAutoscalingPolicy] +// [END dataproc_v1_generated_AutoscalingPolicyService_GetAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go index 6c8e580169e..cbb0ef22e9c 100644 --- a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go +++ b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_ListAutoscalingPolicies] +// [START dataproc_v1_generated_AutoscalingPolicyService_ListAutoscalingPolicies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_ListAutoscalingPolicies] +// [END dataproc_v1_generated_AutoscalingPolicyService_ListAutoscalingPolicies_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/NewAutoscalingPolicyClient/main.go b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/NewAutoscalingPolicyClient/main.go deleted file mode 100644 index b82c639cc77..00000000000 --- a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/NewAutoscalingPolicyClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1_NewAutoscalingPolicyClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewAutoscalingPolicyClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1_NewAutoscalingPolicyClient] diff --git a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go index f00fb8a0f33..e6aefb14a2c 100644 --- a/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_UpdateAutoscalingPolicy] +// [START dataproc_v1_generated_AutoscalingPolicyService_UpdateAutoscalingPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_AutoscalingPolicyClient_UpdateAutoscalingPolicy] +// [END dataproc_v1_generated_AutoscalingPolicyService_UpdateAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/CreateCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/CreateCluster/main.go index 09bca9b5345..e09eee1fa5c 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/CreateCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/CreateCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_CreateCluster] +// [START dataproc_v1_generated_ClusterController_CreateCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_CreateCluster] +// [END dataproc_v1_generated_ClusterController_CreateCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DeleteCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DeleteCluster/main.go index f88567ea0f6..f8ebe5c913e 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DeleteCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DeleteCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_DeleteCluster] +// [START dataproc_v1_generated_ClusterController_DeleteCluster_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_DeleteCluster] +// [END dataproc_v1_generated_ClusterController_DeleteCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DiagnoseCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DiagnoseCluster/main.go index bf55154d26c..5724cdd8b62 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DiagnoseCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/DiagnoseCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_DiagnoseCluster] +// [START dataproc_v1_generated_ClusterController_DiagnoseCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_DiagnoseCluster] +// [END dataproc_v1_generated_ClusterController_DiagnoseCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/GetCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/GetCluster/main.go index 1f0c8a9f247..9a62e872ceb 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/GetCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/GetCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_GetCluster] +// [START dataproc_v1_generated_ClusterController_GetCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_GetCluster] +// [END dataproc_v1_generated_ClusterController_GetCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/ListClusters/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/ListClusters/main.go index 975fc743364..367ffa487e0 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/ListClusters/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/ListClusters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_ListClusters] +// [START dataproc_v1_generated_ClusterController_ListClusters_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_ListClusters] +// [END dataproc_v1_generated_ClusterController_ListClusters_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/NewClusterControllerClient/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/NewClusterControllerClient/main.go deleted file mode 100644 index 592de9f752e..00000000000 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/NewClusterControllerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1_NewClusterControllerClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewClusterControllerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1_NewClusterControllerClient] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StartCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StartCluster/main.go index 74fefa5a6ab..57fcdb5c004 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StartCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StartCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_StartCluster] +// [START dataproc_v1_generated_ClusterController_StartCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_StartCluster] +// [END dataproc_v1_generated_ClusterController_StartCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StopCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StopCluster/main.go index 6eddd3541aa..5d03a689cb9 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StopCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/StopCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_StopCluster] +// [START dataproc_v1_generated_ClusterController_StopCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_StopCluster] +// [END dataproc_v1_generated_ClusterController_StopCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/UpdateCluster/main.go b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/UpdateCluster/main.go index 47534f2cbe1..f446e0a6a71 100644 --- a/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/UpdateCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1/ClusterControllerClient/UpdateCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_ClusterControllerClient_UpdateCluster] +// [START dataproc_v1_generated_ClusterController_UpdateCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_ClusterControllerClient_UpdateCluster] +// [END dataproc_v1_generated_ClusterController_UpdateCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/CancelJob/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/CancelJob/main.go index fd7008fa04a..4d991a31073 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/CancelJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/CancelJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_CancelJob] +// [START dataproc_v1_generated_JobController_CancelJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_CancelJob] +// [END dataproc_v1_generated_JobController_CancelJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/DeleteJob/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/DeleteJob/main.go index b37ef77db07..1f663d52aaa 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/DeleteJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_DeleteJob] +// [START dataproc_v1_generated_JobController_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_DeleteJob] +// [END dataproc_v1_generated_JobController_DeleteJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/GetJob/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/GetJob/main.go index 6be3c7631c4..e16b69884d1 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/GetJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_GetJob] +// [START dataproc_v1_generated_JobController_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_GetJob] +// [END dataproc_v1_generated_JobController_GetJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/ListJobs/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/ListJobs/main.go index e0f92536360..79eb506a6b1 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/ListJobs/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_ListJobs] +// [START dataproc_v1_generated_JobController_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_ListJobs] +// [END dataproc_v1_generated_JobController_ListJobs_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/NewJobControllerClient/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/NewJobControllerClient/main.go deleted file mode 100644 index 2cbd59f13e0..00000000000 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/NewJobControllerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1_NewJobControllerClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewJobControllerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1_NewJobControllerClient] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJob/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJob/main.go index a969fd16036..2580d3acb12 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_SubmitJob] +// [START dataproc_v1_generated_JobController_SubmitJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_SubmitJob] +// [END dataproc_v1_generated_JobController_SubmitJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJobAsOperation/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJobAsOperation/main.go index 6c7d8586966..2d47584dadb 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJobAsOperation/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/SubmitJobAsOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_SubmitJobAsOperation] +// [START dataproc_v1_generated_JobController_SubmitJobAsOperation_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_SubmitJobAsOperation] +// [END dataproc_v1_generated_JobController_SubmitJobAsOperation_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/UpdateJob/main.go b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/UpdateJob/main.go index 16a921b09e8..54dfdb31777 100644 --- a/internal/generated/snippets/dataproc/apiv1/JobControllerClient/UpdateJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1/JobControllerClient/UpdateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_JobControllerClient_UpdateJob] +// [START dataproc_v1_generated_JobController_UpdateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_JobControllerClient_UpdateJob] +// [END dataproc_v1_generated_JobController_UpdateJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/CreateWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/CreateWorkflowTemplate/main.go index 6e507fb7ffc..9df90139e0a 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/CreateWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/CreateWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_CreateWorkflowTemplate] +// [START dataproc_v1_generated_WorkflowTemplateService_CreateWorkflowTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_CreateWorkflowTemplate] +// [END dataproc_v1_generated_WorkflowTemplateService_CreateWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go index 4e49c08d96e..2ab5740c430 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_DeleteWorkflowTemplate] +// [START dataproc_v1_generated_WorkflowTemplateService_DeleteWorkflowTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_DeleteWorkflowTemplate] +// [END dataproc_v1_generated_WorkflowTemplateService_DeleteWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/GetWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/GetWorkflowTemplate/main.go index de2cb89f72d..18c0da652f2 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/GetWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/GetWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_GetWorkflowTemplate] +// [START dataproc_v1_generated_WorkflowTemplateService_GetWorkflowTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_GetWorkflowTemplate] +// [END dataproc_v1_generated_WorkflowTemplateService_GetWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go index 8a4444e1216..470403d28b3 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_InstantiateInlineWorkflowTemplate] +// [START dataproc_v1_generated_WorkflowTemplateService_InstantiateInlineWorkflowTemplate_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_InstantiateInlineWorkflowTemplate] +// [END dataproc_v1_generated_WorkflowTemplateService_InstantiateInlineWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go index 56bfdbe795c..c9e6d280571 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_InstantiateWorkflowTemplate] +// [START dataproc_v1_generated_WorkflowTemplateService_InstantiateWorkflowTemplate_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_InstantiateWorkflowTemplate] +// [END dataproc_v1_generated_WorkflowTemplateService_InstantiateWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/ListWorkflowTemplates/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/ListWorkflowTemplates/main.go index 445cbebdbfe..a0e3a5ab5d4 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/ListWorkflowTemplates/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/ListWorkflowTemplates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_ListWorkflowTemplates] +// [START dataproc_v1_generated_WorkflowTemplateService_ListWorkflowTemplates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_ListWorkflowTemplates] +// [END dataproc_v1_generated_WorkflowTemplateService_ListWorkflowTemplates_sync] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/NewWorkflowTemplateClient/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/NewWorkflowTemplateClient/main.go deleted file mode 100644 index ce0979b5b6e..00000000000 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/NewWorkflowTemplateClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1_NewWorkflowTemplateClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewWorkflowTemplateClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1_NewWorkflowTemplateClient] diff --git a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go index b975445ea7b..3be70293e1a 100644 --- a/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_UpdateWorkflowTemplate] +// [START dataproc_v1_generated_WorkflowTemplateService_UpdateWorkflowTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1_WorkflowTemplateClient_UpdateWorkflowTemplate] +// [END dataproc_v1_generated_WorkflowTemplateService_UpdateWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go index 34cb0a07d11..a46213fe1ce 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/CreateAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_CreateAutoscalingPolicy] +// [START dataproc_v1beta2_generated_AutoscalingPolicyService_CreateAutoscalingPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_CreateAutoscalingPolicy] +// [END dataproc_v1beta2_generated_AutoscalingPolicyService_CreateAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go index 609396d945b..48ac739ec76 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/DeleteAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_DeleteAutoscalingPolicy] +// [START dataproc_v1beta2_generated_AutoscalingPolicyService_DeleteAutoscalingPolicy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_DeleteAutoscalingPolicy] +// [END dataproc_v1beta2_generated_AutoscalingPolicyService_DeleteAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go index 7c52bff1d54..bb18aa17b8d 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/GetAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_GetAutoscalingPolicy] +// [START dataproc_v1beta2_generated_AutoscalingPolicyService_GetAutoscalingPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_GetAutoscalingPolicy] +// [END dataproc_v1beta2_generated_AutoscalingPolicyService_GetAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go index f96b52d9c9a..d13a40e0a60 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/ListAutoscalingPolicies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_ListAutoscalingPolicies] +// [START dataproc_v1beta2_generated_AutoscalingPolicyService_ListAutoscalingPolicies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_ListAutoscalingPolicies] +// [END dataproc_v1beta2_generated_AutoscalingPolicyService_ListAutoscalingPolicies_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/NewAutoscalingPolicyClient/main.go b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/NewAutoscalingPolicyClient/main.go deleted file mode 100644 index 7e66c8c4d6e..00000000000 --- a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/NewAutoscalingPolicyClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1beta2_NewAutoscalingPolicyClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewAutoscalingPolicyClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1beta2_NewAutoscalingPolicyClient] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go index c65e34505fd..60f4acfd491 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/AutoscalingPolicyClient/UpdateAutoscalingPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_UpdateAutoscalingPolicy] +// [START dataproc_v1beta2_generated_AutoscalingPolicyService_UpdateAutoscalingPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_AutoscalingPolicyClient_UpdateAutoscalingPolicy] +// [END dataproc_v1beta2_generated_AutoscalingPolicyService_UpdateAutoscalingPolicy_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/CreateCluster/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/CreateCluster/main.go index 3056ce54c5d..227aa3a93fd 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/CreateCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/CreateCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_CreateCluster] +// [START dataproc_v1beta2_generated_ClusterController_CreateCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_CreateCluster] +// [END dataproc_v1beta2_generated_ClusterController_CreateCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DeleteCluster/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DeleteCluster/main.go index 8de0b5dcf48..b6a0c7e72e3 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DeleteCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DeleteCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_DeleteCluster] +// [START dataproc_v1beta2_generated_ClusterController_DeleteCluster_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_DeleteCluster] +// [END dataproc_v1beta2_generated_ClusterController_DeleteCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DiagnoseCluster/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DiagnoseCluster/main.go index b96241cc6b3..7c0743e4135 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DiagnoseCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/DiagnoseCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_DiagnoseCluster] +// [START dataproc_v1beta2_generated_ClusterController_DiagnoseCluster_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_DiagnoseCluster] +// [END dataproc_v1beta2_generated_ClusterController_DiagnoseCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/GetCluster/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/GetCluster/main.go index 2dbe8985a54..e7f1bf1d2e3 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/GetCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/GetCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_GetCluster] +// [START dataproc_v1beta2_generated_ClusterController_GetCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_GetCluster] +// [END dataproc_v1beta2_generated_ClusterController_GetCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/ListClusters/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/ListClusters/main.go index 0deb1d44319..6d24d82d2fa 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/ListClusters/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/ListClusters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_ListClusters] +// [START dataproc_v1beta2_generated_ClusterController_ListClusters_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_ListClusters] +// [END dataproc_v1beta2_generated_ClusterController_ListClusters_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/NewClusterControllerClient/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/NewClusterControllerClient/main.go deleted file mode 100644 index 409c54318ba..00000000000 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/NewClusterControllerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1beta2_NewClusterControllerClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewClusterControllerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1beta2_NewClusterControllerClient] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/UpdateCluster/main.go b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/UpdateCluster/main.go index 3da56044a05..79d3608d82d 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/UpdateCluster/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/ClusterControllerClient/UpdateCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_UpdateCluster] +// [START dataproc_v1beta2_generated_ClusterController_UpdateCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_ClusterControllerClient_UpdateCluster] +// [END dataproc_v1beta2_generated_ClusterController_UpdateCluster_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/CancelJob/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/CancelJob/main.go index 0102d50e94c..1f692a96250 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/CancelJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/CancelJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_CancelJob] +// [START dataproc_v1beta2_generated_JobController_CancelJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_CancelJob] +// [END dataproc_v1beta2_generated_JobController_CancelJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/DeleteJob/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/DeleteJob/main.go index c6b9135b5d9..1d27d5362f1 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/DeleteJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_DeleteJob] +// [START dataproc_v1beta2_generated_JobController_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_DeleteJob] +// [END dataproc_v1beta2_generated_JobController_DeleteJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/GetJob/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/GetJob/main.go index 5ee0378d792..be360f61c72 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/GetJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_GetJob] +// [START dataproc_v1beta2_generated_JobController_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_GetJob] +// [END dataproc_v1beta2_generated_JobController_GetJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/ListJobs/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/ListJobs/main.go index e7ac78fccba..2a35ac91346 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/ListJobs/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_ListJobs] +// [START dataproc_v1beta2_generated_JobController_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_ListJobs] +// [END dataproc_v1beta2_generated_JobController_ListJobs_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/NewJobControllerClient/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/NewJobControllerClient/main.go deleted file mode 100644 index d1fbcecc6a5..00000000000 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/NewJobControllerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1beta2_NewJobControllerClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewJobControllerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1beta2_NewJobControllerClient] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJob/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJob/main.go index 6a311defea5..3f4b0af2531 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_SubmitJob] +// [START dataproc_v1beta2_generated_JobController_SubmitJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_SubmitJob] +// [END dataproc_v1beta2_generated_JobController_SubmitJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJobAsOperation/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJobAsOperation/main.go index c0784b418fe..45b3b4f8ae6 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJobAsOperation/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/SubmitJobAsOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_SubmitJobAsOperation] +// [START dataproc_v1beta2_generated_JobController_SubmitJobAsOperation_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_SubmitJobAsOperation] +// [END dataproc_v1beta2_generated_JobController_SubmitJobAsOperation_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/UpdateJob/main.go b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/UpdateJob/main.go index 4d90dfa4010..24b002d8c4f 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/UpdateJob/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/JobControllerClient/UpdateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_JobControllerClient_UpdateJob] +// [START dataproc_v1beta2_generated_JobController_UpdateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_JobControllerClient_UpdateJob] +// [END dataproc_v1beta2_generated_JobController_UpdateJob_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/CreateWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/CreateWorkflowTemplate/main.go index 3d7f556717f..a6df9ec449e 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/CreateWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/CreateWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_CreateWorkflowTemplate] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_CreateWorkflowTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_CreateWorkflowTemplate] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_CreateWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go index 3ef1ee53ab4..abddd102350 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/DeleteWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_DeleteWorkflowTemplate] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_DeleteWorkflowTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_DeleteWorkflowTemplate] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_DeleteWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/GetWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/GetWorkflowTemplate/main.go index c4d127b39c3..569b099d5ca 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/GetWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/GetWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_GetWorkflowTemplate] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_GetWorkflowTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_GetWorkflowTemplate] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_GetWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go index dd966f2c993..73c856a0b10 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateInlineWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_InstantiateInlineWorkflowTemplate] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_InstantiateInlineWorkflowTemplate_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_InstantiateInlineWorkflowTemplate] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_InstantiateInlineWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go index 097f667e5fb..f420efed555 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/InstantiateWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_InstantiateWorkflowTemplate] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_InstantiateWorkflowTemplate_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_InstantiateWorkflowTemplate] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_InstantiateWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/ListWorkflowTemplates/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/ListWorkflowTemplates/main.go index e6f2f4f762e..c14cdf2e540 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/ListWorkflowTemplates/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/ListWorkflowTemplates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_ListWorkflowTemplates] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_ListWorkflowTemplates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_ListWorkflowTemplates] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_ListWorkflowTemplates_sync] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/NewWorkflowTemplateClient/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/NewWorkflowTemplateClient/main.go deleted file mode 100644 index df384d3f227..00000000000 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/NewWorkflowTemplateClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataproc_generated_dataproc_apiv1beta2_NewWorkflowTemplateClient] - -package main - -import ( - "context" - - dataproc "cloud.google.com/go/dataproc/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := dataproc.NewWorkflowTemplateClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataproc_generated_dataproc_apiv1beta2_NewWorkflowTemplateClient] diff --git a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go index c3f000b0cec..13cc29e88c8 100644 --- a/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go +++ b/internal/generated/snippets/dataproc/apiv1beta2/WorkflowTemplateClient/UpdateWorkflowTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_UpdateWorkflowTemplate] +// [START dataproc_v1beta2_generated_WorkflowTemplateService_UpdateWorkflowTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataproc_generated_dataproc_apiv1beta2_WorkflowTemplateClient_UpdateWorkflowTemplate] +// [END dataproc_v1beta2_generated_WorkflowTemplateService_UpdateWorkflowTemplate_sync] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/NewAutoSuggestionClient/main.go b/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/NewAutoSuggestionClient/main.go deleted file mode 100644 index 9a7248bf939..00000000000 --- a/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/NewAutoSuggestionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataqna_generated_dataqna_apiv1alpha_NewAutoSuggestionClient] - -package main - -import ( - "context" - - dataqna "cloud.google.com/go/dataqna/apiv1alpha" -) - -func main() { - ctx := context.Background() - c, err := dataqna.NewAutoSuggestionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataqna_generated_dataqna_apiv1alpha_NewAutoSuggestionClient] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/SuggestQueries/main.go b/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/SuggestQueries/main.go index aaa5c27b9ff..64d7cdcbfdd 100644 --- a/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/SuggestQueries/main.go +++ b/internal/generated/snippets/dataqna/apiv1alpha/AutoSuggestionClient/SuggestQueries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataqna_generated_dataqna_apiv1alpha_AutoSuggestionClient_SuggestQueries] +// [START dataqna_v1alpha_generated_AutoSuggestionService_SuggestQueries_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataqna_generated_dataqna_apiv1alpha_AutoSuggestionClient_SuggestQueries] +// [END dataqna_v1alpha_generated_AutoSuggestionService_SuggestQueries_sync] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/CreateQuestion/main.go b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/CreateQuestion/main.go index 01efe408c92..02420d80fea 100644 --- a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/CreateQuestion/main.go +++ b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/CreateQuestion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataqna_generated_dataqna_apiv1alpha_QuestionClient_CreateQuestion] +// [START dataqna_v1alpha_generated_QuestionService_CreateQuestion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataqna_generated_dataqna_apiv1alpha_QuestionClient_CreateQuestion] +// [END dataqna_v1alpha_generated_QuestionService_CreateQuestion_sync] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/ExecuteQuestion/main.go b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/ExecuteQuestion/main.go index ac3ea7a6612..16ce001947e 100644 --- a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/ExecuteQuestion/main.go +++ b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/ExecuteQuestion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataqna_generated_dataqna_apiv1alpha_QuestionClient_ExecuteQuestion] +// [START dataqna_v1alpha_generated_QuestionService_ExecuteQuestion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataqna_generated_dataqna_apiv1alpha_QuestionClient_ExecuteQuestion] +// [END dataqna_v1alpha_generated_QuestionService_ExecuteQuestion_sync] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetQuestion/main.go b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetQuestion/main.go index 716e3b08bd8..8847271b40d 100644 --- a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetQuestion/main.go +++ b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetQuestion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataqna_generated_dataqna_apiv1alpha_QuestionClient_GetQuestion] +// [START dataqna_v1alpha_generated_QuestionService_GetQuestion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataqna_generated_dataqna_apiv1alpha_QuestionClient_GetQuestion] +// [END dataqna_v1alpha_generated_QuestionService_GetQuestion_sync] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetUserFeedback/main.go b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetUserFeedback/main.go index 986ac7ad249..11371d8ec35 100644 --- a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetUserFeedback/main.go +++ b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/GetUserFeedback/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataqna_generated_dataqna_apiv1alpha_QuestionClient_GetUserFeedback] +// [START dataqna_v1alpha_generated_QuestionService_GetUserFeedback_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataqna_generated_dataqna_apiv1alpha_QuestionClient_GetUserFeedback] +// [END dataqna_v1alpha_generated_QuestionService_GetUserFeedback_sync] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/NewQuestionClient/main.go b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/NewQuestionClient/main.go deleted file mode 100644 index 9a1dac1c9cf..00000000000 --- a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/NewQuestionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dataqna_generated_dataqna_apiv1alpha_NewQuestionClient] - -package main - -import ( - "context" - - dataqna "cloud.google.com/go/dataqna/apiv1alpha" -) - -func main() { - ctx := context.Background() - c, err := dataqna.NewQuestionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dataqna_generated_dataqna_apiv1alpha_NewQuestionClient] diff --git a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/UpdateUserFeedback/main.go b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/UpdateUserFeedback/main.go index 55f3394490b..8685e4989ec 100644 --- a/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/UpdateUserFeedback/main.go +++ b/internal/generated/snippets/dataqna/apiv1alpha/QuestionClient/UpdateUserFeedback/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dataqna_generated_dataqna_apiv1alpha_QuestionClient_UpdateUserFeedback] +// [START dataqna_v1alpha_generated_QuestionService_UpdateUserFeedback_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dataqna_generated_dataqna_apiv1alpha_QuestionClient_UpdateUserFeedback] +// [END dataqna_v1alpha_generated_QuestionService_UpdateUserFeedback_sync] diff --git a/internal/generated/snippets/datastore/Client/AllocateIDs/main.go b/internal/generated/snippets/datastore/Client/AllocateIDs/main.go deleted file mode 100644 index 125f97c75d9..00000000000 --- a/internal/generated/snippets/datastore/Client/AllocateIDs/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_AllocateIDs] - -package main - -import ( - "context" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - var keys []*datastore.Key - for i := 0; i < 10; i++ { - keys = append(keys, datastore.IncompleteKey("Article", nil)) - } - keys, err = client.AllocateIDs(ctx, keys) - if err != nil { - // TODO: Handle error. - } - _ = keys // TODO: Use keys. -} - -// [END datastore_generated_datastore_Client_AllocateIDs] diff --git a/internal/generated/snippets/datastore/Client/Count/main.go b/internal/generated/snippets/datastore/Client/Count/main.go deleted file mode 100644 index 71763cf4c50..00000000000 --- a/internal/generated/snippets/datastore/Client/Count/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Count] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // Count the number of the post entities. - q := datastore.NewQuery("Post") - n, err := client.Count(ctx, q) - if err != nil { - // TODO: Handle error. - } - fmt.Printf("There are %d posts.", n) -} - -// [END datastore_generated_datastore_Client_Count] diff --git a/internal/generated/snippets/datastore/Client/Delete/main.go b/internal/generated/snippets/datastore/Client/Delete/main.go deleted file mode 100644 index 6dd8b47c3d6..00000000000 --- a/internal/generated/snippets/datastore/Client/Delete/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - key := datastore.NameKey("Article", "articled1", nil) - if err := client.Delete(ctx, key); err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_Delete] diff --git a/internal/generated/snippets/datastore/Client/DeleteMulti/main.go b/internal/generated/snippets/datastore/Client/DeleteMulti/main.go deleted file mode 100644 index 4c8e0bd3493..00000000000 --- a/internal/generated/snippets/datastore/Client/DeleteMulti/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_DeleteMulti] - -package main - -import ( - "context" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - var keys []*datastore.Key - for i := 1; i <= 10; i++ { - keys = append(keys, datastore.IDKey("Article", int64(i), nil)) - } - if err := client.DeleteMulti(ctx, keys); err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_DeleteMulti] diff --git a/internal/generated/snippets/datastore/Client/Get/main.go b/internal/generated/snippets/datastore/Client/Get/main.go deleted file mode 100644 index ad5548632bf..00000000000 --- a/internal/generated/snippets/datastore/Client/Get/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Get] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - type Article struct { - Title string - Description string - Body string `datastore:",noindex"` - Author *datastore.Key - PublishedAt time.Time - } - key := datastore.NameKey("Article", "articled1", nil) - article := &Article{} - if err := client.Get(ctx, key, article); err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_Get] diff --git a/internal/generated/snippets/datastore/Client/GetAll/main.go b/internal/generated/snippets/datastore/Client/GetAll/main.go deleted file mode 100644 index 5dca918e49b..00000000000 --- a/internal/generated/snippets/datastore/Client/GetAll/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_GetAll] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - var posts []*Post - keys, err := client.GetAll(ctx, datastore.NewQuery("Post"), &posts) - if err != nil { - // TODO: Handle error. - } - for i, key := range keys { - fmt.Println(key) - fmt.Println(posts[i]) - } -} - -// [END datastore_generated_datastore_Client_GetAll] diff --git a/internal/generated/snippets/datastore/Client/GetMulti/main.go b/internal/generated/snippets/datastore/Client/GetMulti/main.go deleted file mode 100644 index 1961648adfe..00000000000 --- a/internal/generated/snippets/datastore/Client/GetMulti/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_GetMulti] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - keys := []*datastore.Key{ - datastore.NameKey("Post", "post1", nil), - datastore.NameKey("Post", "post2", nil), - datastore.NameKey("Post", "post3", nil), - } - posts := make([]Post, 3) - if err := client.GetMulti(ctx, keys, posts); err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_GetMulti] diff --git a/internal/generated/snippets/datastore/Client/Mutate/main.go b/internal/generated/snippets/datastore/Client/Mutate/main.go deleted file mode 100644 index 04642f08f87..00000000000 --- a/internal/generated/snippets/datastore/Client/Mutate/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Mutate] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - key1 := datastore.NameKey("Post", "post1", nil) - key2 := datastore.NameKey("Post", "post2", nil) - key3 := datastore.NameKey("Post", "post3", nil) - key4 := datastore.NameKey("Post", "post4", nil) - - _, err = client.Mutate(ctx, - datastore.NewInsert(key1, Post{Title: "Post 1"}), - datastore.NewUpsert(key2, Post{Title: "Post 2"}), - datastore.NewUpdate(key3, Post{Title: "Post 3"}), - datastore.NewDelete(key4)) - if err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_Mutate] diff --git a/internal/generated/snippets/datastore/Client/NewClient/main.go b/internal/generated/snippets/datastore/Client/NewClient/main.go deleted file mode 100644 index e9f8191785b..00000000000 --- a/internal/generated/snippets/datastore/Client/NewClient/main.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - _ = client // TODO: Use client. -} - -// [END datastore_generated_datastore_NewClient] diff --git a/internal/generated/snippets/datastore/Client/NewTransaction/main.go b/internal/generated/snippets/datastore/Client/NewTransaction/main.go deleted file mode 100644 index 71bc92e21e3..00000000000 --- a/internal/generated/snippets/datastore/Client/NewTransaction/main.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_NewTransaction] - -package main - -import ( - "context" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - const retries = 3 - - // Increment a counter. - // See https://cloud.google.com/appengine/articles/sharding_counters for - // a more scalable solution. - type Counter struct { - Count int - } - - key := datastore.NameKey("counter", "CounterA", nil) - var tx *datastore.Transaction - for i := 0; i < retries; i++ { - tx, err = client.NewTransaction(ctx) - if err != nil { - break - } - - var c Counter - if err = tx.Get(key, &c); err != nil && err != datastore.ErrNoSuchEntity { - break - } - c.Count++ - if _, err = tx.Put(key, &c); err != nil { - break - } - - // Attempt to commit the transaction. If there's a conflict, try again. - if _, err = tx.Commit(); err != datastore.ErrConcurrentTransaction { - break - } - } - if err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_NewTransaction] diff --git a/internal/generated/snippets/datastore/Client/Put/flatten/main.go b/internal/generated/snippets/datastore/Client/Put/flatten/main.go deleted file mode 100644 index 281e90971ac..00000000000 --- a/internal/generated/snippets/datastore/Client/Put/flatten/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Put_flatten] - -package main - -import ( - "context" - "log" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - log.Fatal(err) - } - - type Animal struct { - Name string - Type string - Breed string - } - - type Human struct { - Name string - Height int - Pet Animal `datastore:",flatten"` - } - - newKey := datastore.IncompleteKey("Human", nil) - _, err = client.Put(ctx, newKey, &Human{ - Name: "Susan", - Height: 67, - Pet: Animal{ - Name: "Fluffy", - Type: "Cat", - Breed: "Sphynx", - }, - }) - if err != nil { - log.Fatal(err) - } -} - -// [END datastore_generated_datastore_Client_Put_flatten] diff --git a/internal/generated/snippets/datastore/Client/Put/main.go b/internal/generated/snippets/datastore/Client/Put/main.go deleted file mode 100644 index 36e332bac4b..00000000000 --- a/internal/generated/snippets/datastore/Client/Put/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Put] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - type Article struct { - Title string - Description string - Body string `datastore:",noindex"` - Author *datastore.Key - PublishedAt time.Time - } - newKey := datastore.IncompleteKey("Article", nil) - _, err = client.Put(ctx, newKey, &Article{ - Title: "The title of the article", - Description: "The description of the article...", - Body: "...", - Author: datastore.NameKey("Author", "jbd", nil), - PublishedAt: time.Now(), - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_Put] diff --git a/internal/generated/snippets/datastore/Client/PutMulti/interfaceSlice/main.go b/internal/generated/snippets/datastore/Client/PutMulti/interfaceSlice/main.go deleted file mode 100644 index a85f7818223..00000000000 --- a/internal/generated/snippets/datastore/Client/PutMulti/interfaceSlice/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_PutMulti_interfaceSlice] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - keys := []*datastore.Key{ - datastore.NameKey("Post", "post1", nil), - datastore.NameKey("Post", "post2", nil), - } - - // PutMulti with an empty interface slice. - posts := []interface{}{ - &Post{Title: "Post 1", PublishedAt: time.Now()}, - &Post{Title: "Post 2", PublishedAt: time.Now()}, - } - if _, err := client.PutMulti(ctx, keys, posts); err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_PutMulti_interfaceSlice] diff --git a/internal/generated/snippets/datastore/Client/PutMulti/slice/main.go b/internal/generated/snippets/datastore/Client/PutMulti/slice/main.go deleted file mode 100644 index 114bb5d06b1..00000000000 --- a/internal/generated/snippets/datastore/Client/PutMulti/slice/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_PutMulti_slice] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - keys := []*datastore.Key{ - datastore.NameKey("Post", "post1", nil), - datastore.NameKey("Post", "post2", nil), - } - - // PutMulti with a Post slice. - posts := []*Post{ - {Title: "Post 1", PublishedAt: time.Now()}, - {Title: "Post 2", PublishedAt: time.Now()}, - } - if _, err := client.PutMulti(ctx, keys, posts); err != nil { - // TODO: Handle error. - } -} - -// [END datastore_generated_datastore_Client_PutMulti_slice] diff --git a/internal/generated/snippets/datastore/Client/Run/main.go b/internal/generated/snippets/datastore/Client/Run/main.go deleted file mode 100644 index 407fd599167..00000000000 --- a/internal/generated/snippets/datastore/Client/Run/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_Run] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // List the posts published since yesterday. - yesterday := time.Now().Add(-24 * time.Hour) - q := datastore.NewQuery("Post").Filter("PublishedAt >", yesterday) - it := client.Run(ctx, q) - _ = it // TODO: iterate using Next. -} - -// [END datastore_generated_datastore_Client_Run] diff --git a/internal/generated/snippets/datastore/Client/RunInTransaction/main.go b/internal/generated/snippets/datastore/Client/RunInTransaction/main.go deleted file mode 100644 index 3684a816a45..00000000000 --- a/internal/generated/snippets/datastore/Client/RunInTransaction/main.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Client_RunInTransaction] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/datastore" -) - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - // Increment a counter. - // See https://cloud.google.com/appengine/articles/sharding_counters for - // a more scalable solution. - type Counter struct { - Count int - } - - var count int - key := datastore.NameKey("Counter", "singleton", nil) - _, err = client.RunInTransaction(ctx, func(tx *datastore.Transaction) error { - var x Counter - if err := tx.Get(key, &x); err != nil && err != datastore.ErrNoSuchEntity { - return err - } - x.Count++ - if _, err := tx.Put(key, &x); err != nil { - return err - } - count = x.Count - return nil - }) - if err != nil { - // TODO: Handle error. - } - // The value of count is only valid once the transaction is successful - // (RunInTransaction has returned nil). - fmt.Printf("Count=%d\n", count) -} - -// [END datastore_generated_datastore_Client_RunInTransaction] diff --git a/internal/generated/snippets/datastore/Commit/Key/main.go b/internal/generated/snippets/datastore/Commit/Key/main.go deleted file mode 100644 index 9c310941c39..00000000000 --- a/internal/generated/snippets/datastore/Commit/Key/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Commit_Key] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "") - if err != nil { - // TODO: Handle error. - } - var pk1, pk2 *datastore.PendingKey - // Create two posts in a single transaction. - commit, err := client.RunInTransaction(ctx, func(tx *datastore.Transaction) error { - var err error - pk1, err = tx.Put(datastore.IncompleteKey("Post", nil), &Post{Title: "Post 1", PublishedAt: time.Now()}) - if err != nil { - return err - } - pk2, err = tx.Put(datastore.IncompleteKey("Post", nil), &Post{Title: "Post 2", PublishedAt: time.Now()}) - if err != nil { - return err - } - return nil - }) - if err != nil { - // TODO: Handle error. - } - // Now pk1, pk2 are valid PendingKeys. Let's convert them into real keys - // using the Commit object. - k1 := commit.Key(pk1) - k2 := commit.Key(pk2) - fmt.Println(k1, k2) -} - -// [END datastore_generated_datastore_Commit_Key] diff --git a/internal/generated/snippets/datastore/Cursor/DecodeCursor/main.go b/internal/generated/snippets/datastore/Cursor/DecodeCursor/main.go deleted file mode 100644 index 3efb29371fc..00000000000 --- a/internal/generated/snippets/datastore/Cursor/DecodeCursor/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_DecodeCursor] - -package main - -import ( - "cloud.google.com/go/datastore" -) - -func main() { - // See Query.Start for a fuller example of DecodeCursor. - // getCursor represents a function that returns a cursor from a previous - // iteration in string form. - cursorString := getCursor() - cursor, err := datastore.DecodeCursor(cursorString) - if err != nil { - // TODO: Handle error. - } - _ = cursor // TODO: Use the cursor with Query.Start or Query.End. -} - -func getCursor() string { return "" } - -// [END datastore_generated_datastore_DecodeCursor] diff --git a/internal/generated/snippets/datastore/Iterator/Cursor/main.go b/internal/generated/snippets/datastore/Iterator/Cursor/main.go deleted file mode 100644 index a0b60ea1f0d..00000000000 --- a/internal/generated/snippets/datastore/Iterator/Cursor/main.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Iterator_Cursor] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/datastore" - "google.golang.org/api/iterator" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Run(ctx, datastore.NewQuery("Post")) - for { - var p Post - _, err := it.Next(&p) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(p) - cursor, err := it.Cursor() - if err != nil { - // TODO: Handle error. - } - // When printed, a cursor will display as a string that can be passed - // to datastore.DecodeCursor. - fmt.Printf("to resume with this post, use cursor %s\n", cursor) - } -} - -// [END datastore_generated_datastore_Iterator_Cursor] diff --git a/internal/generated/snippets/datastore/Iterator/Next/main.go b/internal/generated/snippets/datastore/Iterator/Next/main.go deleted file mode 100644 index 9937afe4759..00000000000 --- a/internal/generated/snippets/datastore/Iterator/Next/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Iterator_Next] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/datastore" - "google.golang.org/api/iterator" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Run(ctx, datastore.NewQuery("Post")) - for { - var p Post - key, err := it.Next(&p) - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(key, p) - } -} - -// [END datastore_generated_datastore_Iterator_Next] diff --git a/internal/generated/snippets/datastore/Key/DecodeKey/main.go b/internal/generated/snippets/datastore/Key/DecodeKey/main.go deleted file mode 100644 index 4826123e432..00000000000 --- a/internal/generated/snippets/datastore/Key/DecodeKey/main.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_DecodeKey] - -package main - -import ( - "fmt" - - "cloud.google.com/go/datastore" -) - -func main() { - const encoded = "EgsKB0FydGljbGUQAQ" - key, err := datastore.DecodeKey(encoded) - if err != nil { - // TODO: Handle error. - } - fmt.Println(key) -} - -// [END datastore_generated_datastore_DecodeKey] diff --git a/internal/generated/snippets/datastore/Key/Encode/main.go b/internal/generated/snippets/datastore/Key/Encode/main.go deleted file mode 100644 index 9abaa08713f..00000000000 --- a/internal/generated/snippets/datastore/Key/Encode/main.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Key_Encode] - -package main - -import ( - "fmt" - - "cloud.google.com/go/datastore" -) - -func main() { - key := datastore.IDKey("Article", 1, nil) - encoded := key.Encode() - fmt.Println(encoded) -} - -// [END datastore_generated_datastore_Key_Encode] diff --git a/internal/generated/snippets/datastore/Key/IDKey/main.go b/internal/generated/snippets/datastore/Key/IDKey/main.go deleted file mode 100644 index 2e325d547cb..00000000000 --- a/internal/generated/snippets/datastore/Key/IDKey/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_IDKey] - -package main - -import ( - "cloud.google.com/go/datastore" -) - -func main() { - // Key with numeric ID. - k := datastore.IDKey("Article", 1, nil) - _ = k // TODO: Use key. -} - -// [END datastore_generated_datastore_IDKey] diff --git a/internal/generated/snippets/datastore/Key/IncompleteKey/main.go b/internal/generated/snippets/datastore/Key/IncompleteKey/main.go deleted file mode 100644 index 4aa0b680919..00000000000 --- a/internal/generated/snippets/datastore/Key/IncompleteKey/main.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_IncompleteKey] - -package main - -import ( - "cloud.google.com/go/datastore" -) - -func main() { - k := datastore.IncompleteKey("Article", nil) - _ = k // TODO: Use incomplete key. -} - -// [END datastore_generated_datastore_IncompleteKey] diff --git a/internal/generated/snippets/datastore/Key/NameKey/main.go b/internal/generated/snippets/datastore/Key/NameKey/main.go deleted file mode 100644 index 2954a1aa8d4..00000000000 --- a/internal/generated/snippets/datastore/Key/NameKey/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_NameKey] - -package main - -import ( - "cloud.google.com/go/datastore" -) - -func main() { - // Key with string ID. - k := datastore.NameKey("Article", "article8", nil) - _ = k // TODO: Use key. -} - -// [END datastore_generated_datastore_NameKey] diff --git a/internal/generated/snippets/datastore/LoadStruct/main.go b/internal/generated/snippets/datastore/LoadStruct/main.go deleted file mode 100644 index b12a62853fd..00000000000 --- a/internal/generated/snippets/datastore/LoadStruct/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_LoadStruct] - -package main - -import ( - "fmt" - - "cloud.google.com/go/datastore" -) - -func main() { - type Player struct { - User string - Score int - } - // Normally LoadStruct would only be used inside a custom implementation of - // PropertyLoadSaver; this is for illustrative purposes only. - props := []datastore.Property{ - {Name: "User", Value: "Alice"}, - {Name: "Score", Value: int64(97)}, - } - - var p Player - if err := datastore.LoadStruct(&p, props); err != nil { - // TODO: Handle error. - } - fmt.Println(p) -} - -// [END datastore_generated_datastore_LoadStruct] diff --git a/internal/generated/snippets/datastore/MultiError/main.go b/internal/generated/snippets/datastore/MultiError/main.go deleted file mode 100644 index 43dab713108..00000000000 --- a/internal/generated/snippets/datastore/MultiError/main.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_MultiError] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/datastore" -) - -type Post struct { - Title string - PublishedAt time.Time - Comments int -} - -func main() { - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - keys := []*datastore.Key{ - datastore.NameKey("bad-key", "bad-key", nil), - } - posts := make([]Post, 1) - if err := client.GetMulti(ctx, keys, posts); err != nil { - if merr, ok := err.(datastore.MultiError); ok { - for _, err := range merr { - // TODO: Handle error. - _ = err - } - } else { - // TODO: Handle error. - } - } -} - -// [END datastore_generated_datastore_MultiError] diff --git a/internal/generated/snippets/datastore/Property/SaveStruct/main.go b/internal/generated/snippets/datastore/Property/SaveStruct/main.go deleted file mode 100644 index 2c8f6e0287f..00000000000 --- a/internal/generated/snippets/datastore/Property/SaveStruct/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_SaveStruct] - -package main - -import ( - "fmt" - - "cloud.google.com/go/datastore" -) - -func main() { - type Player struct { - User string - Score int - } - - p := &Player{ - User: "Alice", - Score: 97, - } - props, err := datastore.SaveStruct(p) - if err != nil { - // TODO: Handle error. - } - fmt.Println(props) - // TODO(jba): make this output stable: Output: [{User Alice false} {Score 97 false}] -} - -// [END datastore_generated_datastore_SaveStruct] diff --git a/internal/generated/snippets/datastore/Query/NewQuery/main.go b/internal/generated/snippets/datastore/Query/NewQuery/main.go deleted file mode 100644 index 65c22a77c1b..00000000000 --- a/internal/generated/snippets/datastore/Query/NewQuery/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_NewQuery] - -package main - -import ( - "cloud.google.com/go/datastore" -) - -func main() { - // Query for Post entities. - q := datastore.NewQuery("Post") - _ = q // TODO: Use the query with Client.Run. -} - -// [END datastore_generated_datastore_NewQuery] diff --git a/internal/generated/snippets/datastore/Query/NewQuery/options/main.go b/internal/generated/snippets/datastore/Query/NewQuery/options/main.go deleted file mode 100644 index cd095b393e9..00000000000 --- a/internal/generated/snippets/datastore/Query/NewQuery/options/main.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_NewQuery_options] - -package main - -import ( - "cloud.google.com/go/datastore" -) - -func main() { - // Query to order the posts by the number of comments they have received. - q := datastore.NewQuery("Post").Order("-Comments") - // Start listing from an offset and limit the results. - q = q.Offset(20).Limit(10) - _ = q // TODO: Use the query. -} - -// [END datastore_generated_datastore_NewQuery_options] diff --git a/internal/generated/snippets/datastore/Query/Start/main.go b/internal/generated/snippets/datastore/Query/Start/main.go deleted file mode 100644 index e9a61ec4e7b..00000000000 --- a/internal/generated/snippets/datastore/Query/Start/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_Query_Start] - -package main - -import ( - "context" - - "cloud.google.com/go/datastore" -) - -func getCursor() string { return "" } - -func main() { - // This example demonstrates how to use cursors and Query.Start - // to resume an iteration. - ctx := context.Background() - client, err := datastore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // getCursor represents a function that returns a cursor from a previous - // iteration in string form. - cursorString := getCursor() - cursor, err := datastore.DecodeCursor(cursorString) - if err != nil { - // TODO: Handle error. - } - it := client.Run(ctx, datastore.NewQuery("Post").Start(cursor)) - _ = it // TODO: Use iterator. -} - -// [END datastore_generated_datastore_Query_Start] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/CreateIndex/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/CreateIndex/main.go index 48f16096bd5..70c0374cb90 100644 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/CreateIndex/main.go +++ b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/CreateIndex/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_CreateIndex] +// [START datastore_v1_generated_DatastoreAdmin_CreateIndex_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_CreateIndex] +// [END datastore_v1_generated_DatastoreAdmin_CreateIndex_sync] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/DeleteIndex/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/DeleteIndex/main.go index 76869f30df4..2e62fe26c29 100644 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/DeleteIndex/main.go +++ b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/DeleteIndex/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_DeleteIndex] +// [START datastore_v1_generated_DatastoreAdmin_DeleteIndex_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_DeleteIndex] +// [END datastore_v1_generated_DatastoreAdmin_DeleteIndex_sync] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ExportEntities/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ExportEntities/main.go index 42d4f730aa4..441c096cc73 100644 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ExportEntities/main.go +++ b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ExportEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_ExportEntities] +// [START datastore_v1_generated_DatastoreAdmin_ExportEntities_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_ExportEntities] +// [END datastore_v1_generated_DatastoreAdmin_ExportEntities_sync] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/GetIndex/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/GetIndex/main.go index 4bec7857231..91f628af591 100644 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/GetIndex/main.go +++ b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/GetIndex/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_GetIndex] +// [START datastore_v1_generated_DatastoreAdmin_GetIndex_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_GetIndex] +// [END datastore_v1_generated_DatastoreAdmin_GetIndex_sync] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ImportEntities/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ImportEntities/main.go index 94ebfcda2b8..75146389afa 100644 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ImportEntities/main.go +++ b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ImportEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_ImportEntities] +// [START datastore_v1_generated_DatastoreAdmin_ImportEntities_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_ImportEntities] +// [END datastore_v1_generated_DatastoreAdmin_ImportEntities_sync] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ListIndexes/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ListIndexes/main.go index eefa4ca00bb..d39a65625c1 100644 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ListIndexes/main.go +++ b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/ListIndexes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_ListIndexes] +// [START datastore_v1_generated_DatastoreAdmin_ListIndexes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END datastore_generated_datastore_admin_apiv1_DatastoreAdminClient_ListIndexes] +// [END datastore_v1_generated_DatastoreAdmin_ListIndexes_sync] diff --git a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/NewDatastoreAdminClient/main.go b/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/NewDatastoreAdminClient/main.go deleted file mode 100644 index d73ac139c4d..00000000000 --- a/internal/generated/snippets/datastore/admin/apiv1/DatastoreAdminClient/NewDatastoreAdminClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START datastore_generated_datastore_admin_apiv1_NewDatastoreAdminClient] - -package main - -import ( - "context" - - admin "cloud.google.com/go/datastore/admin/apiv1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewDatastoreAdminClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END datastore_generated_datastore_admin_apiv1_NewDatastoreAdminClient] diff --git a/internal/generated/snippets/debugger/apiv2/Controller2Client/ListActiveBreakpoints/main.go b/internal/generated/snippets/debugger/apiv2/Controller2Client/ListActiveBreakpoints/main.go index 8e1b7cd7e62..a18d23e58c8 100644 --- a/internal/generated/snippets/debugger/apiv2/Controller2Client/ListActiveBreakpoints/main.go +++ b/internal/generated/snippets/debugger/apiv2/Controller2Client/ListActiveBreakpoints/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Controller2Client_ListActiveBreakpoints] +// [START clouddebugger_v2_generated_Controller2_ListActiveBreakpoints_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Controller2Client_ListActiveBreakpoints] +// [END clouddebugger_v2_generated_Controller2_ListActiveBreakpoints_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Controller2Client/NewController2Client/main.go b/internal/generated/snippets/debugger/apiv2/Controller2Client/NewController2Client/main.go deleted file mode 100644 index e6505c1e82a..00000000000 --- a/internal/generated/snippets/debugger/apiv2/Controller2Client/NewController2Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START clouddebugger_generated_debugger_apiv2_NewController2Client] - -package main - -import ( - "context" - - debugger "cloud.google.com/go/debugger/apiv2" -) - -func main() { - ctx := context.Background() - c, err := debugger.NewController2Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END clouddebugger_generated_debugger_apiv2_NewController2Client] diff --git a/internal/generated/snippets/debugger/apiv2/Controller2Client/RegisterDebuggee/main.go b/internal/generated/snippets/debugger/apiv2/Controller2Client/RegisterDebuggee/main.go index f84d717ebf7..0b426605353 100644 --- a/internal/generated/snippets/debugger/apiv2/Controller2Client/RegisterDebuggee/main.go +++ b/internal/generated/snippets/debugger/apiv2/Controller2Client/RegisterDebuggee/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Controller2Client_RegisterDebuggee] +// [START clouddebugger_v2_generated_Controller2_RegisterDebuggee_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Controller2Client_RegisterDebuggee] +// [END clouddebugger_v2_generated_Controller2_RegisterDebuggee_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Controller2Client/UpdateActiveBreakpoint/main.go b/internal/generated/snippets/debugger/apiv2/Controller2Client/UpdateActiveBreakpoint/main.go index 692dfaf7a57..8cd6dba79dd 100644 --- a/internal/generated/snippets/debugger/apiv2/Controller2Client/UpdateActiveBreakpoint/main.go +++ b/internal/generated/snippets/debugger/apiv2/Controller2Client/UpdateActiveBreakpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Controller2Client_UpdateActiveBreakpoint] +// [START clouddebugger_v2_generated_Controller2_UpdateActiveBreakpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Controller2Client_UpdateActiveBreakpoint] +// [END clouddebugger_v2_generated_Controller2_UpdateActiveBreakpoint_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Debugger2Client/DeleteBreakpoint/main.go b/internal/generated/snippets/debugger/apiv2/Debugger2Client/DeleteBreakpoint/main.go index 9e5fc99d9ee..3283ea9422f 100644 --- a/internal/generated/snippets/debugger/apiv2/Debugger2Client/DeleteBreakpoint/main.go +++ b/internal/generated/snippets/debugger/apiv2/Debugger2Client/DeleteBreakpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Debugger2Client_DeleteBreakpoint] +// [START clouddebugger_v2_generated_Debugger2_DeleteBreakpoint_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END clouddebugger_generated_debugger_apiv2_Debugger2Client_DeleteBreakpoint] +// [END clouddebugger_v2_generated_Debugger2_DeleteBreakpoint_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Debugger2Client/GetBreakpoint/main.go b/internal/generated/snippets/debugger/apiv2/Debugger2Client/GetBreakpoint/main.go index fc5c515a77e..c17cf47492a 100644 --- a/internal/generated/snippets/debugger/apiv2/Debugger2Client/GetBreakpoint/main.go +++ b/internal/generated/snippets/debugger/apiv2/Debugger2Client/GetBreakpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Debugger2Client_GetBreakpoint] +// [START clouddebugger_v2_generated_Debugger2_GetBreakpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Debugger2Client_GetBreakpoint] +// [END clouddebugger_v2_generated_Debugger2_GetBreakpoint_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListBreakpoints/main.go b/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListBreakpoints/main.go index 412e98f5d91..4ce859a945c 100644 --- a/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListBreakpoints/main.go +++ b/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListBreakpoints/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Debugger2Client_ListBreakpoints] +// [START clouddebugger_v2_generated_Debugger2_ListBreakpoints_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Debugger2Client_ListBreakpoints] +// [END clouddebugger_v2_generated_Debugger2_ListBreakpoints_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListDebuggees/main.go b/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListDebuggees/main.go index 2e74cc71d64..8f9182fadbc 100644 --- a/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListDebuggees/main.go +++ b/internal/generated/snippets/debugger/apiv2/Debugger2Client/ListDebuggees/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Debugger2Client_ListDebuggees] +// [START clouddebugger_v2_generated_Debugger2_ListDebuggees_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Debugger2Client_ListDebuggees] +// [END clouddebugger_v2_generated_Debugger2_ListDebuggees_sync] diff --git a/internal/generated/snippets/debugger/apiv2/Debugger2Client/NewDebugger2Client/main.go b/internal/generated/snippets/debugger/apiv2/Debugger2Client/NewDebugger2Client/main.go deleted file mode 100644 index 6a88c033a89..00000000000 --- a/internal/generated/snippets/debugger/apiv2/Debugger2Client/NewDebugger2Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START clouddebugger_generated_debugger_apiv2_NewDebugger2Client] - -package main - -import ( - "context" - - debugger "cloud.google.com/go/debugger/apiv2" -) - -func main() { - ctx := context.Background() - c, err := debugger.NewDebugger2Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END clouddebugger_generated_debugger_apiv2_NewDebugger2Client] diff --git a/internal/generated/snippets/debugger/apiv2/Debugger2Client/SetBreakpoint/main.go b/internal/generated/snippets/debugger/apiv2/Debugger2Client/SetBreakpoint/main.go index 13ba3f5553d..3ba91565ca3 100644 --- a/internal/generated/snippets/debugger/apiv2/Debugger2Client/SetBreakpoint/main.go +++ b/internal/generated/snippets/debugger/apiv2/Debugger2Client/SetBreakpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouddebugger_generated_debugger_apiv2_Debugger2Client_SetBreakpoint] +// [START clouddebugger_v2_generated_Debugger2_SetBreakpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouddebugger_generated_debugger_apiv2_Debugger2Client_SetBreakpoint] +// [END clouddebugger_v2_generated_Debugger2_SetBreakpoint_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/DeleteAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/DeleteAgent/main.go index c1f028b11b3..f536e28beb5 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/DeleteAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/DeleteAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_DeleteAgent] +// [START dialogflow_v2_generated_Agents_DeleteAgent_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_DeleteAgent] +// [END dialogflow_v2_generated_Agents_DeleteAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ExportAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ExportAgent/main.go index f765541f7b4..1f3d0e96400 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ExportAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ExportAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_ExportAgent] +// [START dialogflow_v2_generated_Agents_ExportAgent_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_ExportAgent] +// [END dialogflow_v2_generated_Agents_ExportAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetAgent/main.go index 0cbd2ecb9cc..f2e73a6bf0b 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_GetAgent] +// [START dialogflow_v2_generated_Agents_GetAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_GetAgent] +// [END dialogflow_v2_generated_Agents_GetAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetValidationResult/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetValidationResult/main.go index c0cabf79cd8..ab1863f18fc 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetValidationResult/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/GetValidationResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_GetValidationResult] +// [START dialogflow_v2_generated_Agents_GetValidationResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_GetValidationResult] +// [END dialogflow_v2_generated_Agents_GetValidationResult_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ImportAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ImportAgent/main.go index dd027440dcc..8188e4629dc 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ImportAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/ImportAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_ImportAgent] +// [START dialogflow_v2_generated_Agents_ImportAgent_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_ImportAgent] +// [END dialogflow_v2_generated_Agents_ImportAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/NewAgentsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/NewAgentsClient/main.go deleted file mode 100644 index 9cce231d04d..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/NewAgentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewAgentsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewAgentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewAgentsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/RestoreAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/RestoreAgent/main.go index 0766c1fce02..c5dcc55f00b 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/RestoreAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/RestoreAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_RestoreAgent] +// [START dialogflow_v2_generated_Agents_RestoreAgent_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_RestoreAgent] +// [END dialogflow_v2_generated_Agents_RestoreAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SearchAgents/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SearchAgents/main.go index 44a36fa21a4..d86d1be3ad8 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SearchAgents/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SearchAgents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_SearchAgents] +// [START dialogflow_v2_generated_Agents_SearchAgents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_SearchAgents] +// [END dialogflow_v2_generated_Agents_SearchAgents_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SetAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SetAgent/main.go index 9e751e3cc8f..56977185379 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SetAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/SetAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_SetAgent] +// [START dialogflow_v2_generated_Agents_SetAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_SetAgent] +// [END dialogflow_v2_generated_Agents_SetAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/TrainAgent/main.go b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/TrainAgent/main.go index a3d062e1804..cbacfc84c00 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AgentsClient/TrainAgent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AgentsClient/TrainAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AgentsClient_TrainAgent] +// [START dialogflow_v2_generated_Agents_TrainAgent_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_AgentsClient_TrainAgent] +// [END dialogflow_v2_generated_Agents_TrainAgent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/ListAnswerRecords/main.go b/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/ListAnswerRecords/main.go index 8a6fee8b348..8b3895e56ca 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/ListAnswerRecords/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/ListAnswerRecords/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AnswerRecordsClient_ListAnswerRecords] +// [START dialogflow_v2_generated_AnswerRecords_ListAnswerRecords_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_AnswerRecordsClient_ListAnswerRecords] +// [END dialogflow_v2_generated_AnswerRecords_ListAnswerRecords_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/NewAnswerRecordsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/NewAnswerRecordsClient/main.go deleted file mode 100644 index 0e86678db43..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/NewAnswerRecordsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewAnswerRecordsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewAnswerRecordsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewAnswerRecordsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/UpdateAnswerRecord/main.go b/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/UpdateAnswerRecord/main.go index 3daab324025..dcb82bff45e 100644 --- a/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/UpdateAnswerRecord/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/AnswerRecordsClient/UpdateAnswerRecord/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_AnswerRecordsClient_UpdateAnswerRecord] +// [START dialogflow_v2_generated_AnswerRecords_UpdateAnswerRecord_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_AnswerRecordsClient_UpdateAnswerRecord] +// [END dialogflow_v2_generated_AnswerRecords_UpdateAnswerRecord_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/CreateContext/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/CreateContext/main.go index 103b9c45f5f..35c54acf1ae 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/CreateContext/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/CreateContext/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ContextsClient_CreateContext] +// [START dialogflow_v2_generated_Contexts_CreateContext_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ContextsClient_CreateContext] +// [END dialogflow_v2_generated_Contexts_CreateContext_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteAllContexts/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteAllContexts/main.go index d3d25a9ceaf..c816db8b4a2 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteAllContexts/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteAllContexts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ContextsClient_DeleteAllContexts] +// [START dialogflow_v2_generated_Contexts_DeleteAllContexts_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ContextsClient_DeleteAllContexts] +// [END dialogflow_v2_generated_Contexts_DeleteAllContexts_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteContext/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteContext/main.go index 90f18147469..2686ea37790 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteContext/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/DeleteContext/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ContextsClient_DeleteContext] +// [START dialogflow_v2_generated_Contexts_DeleteContext_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ContextsClient_DeleteContext] +// [END dialogflow_v2_generated_Contexts_DeleteContext_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/GetContext/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/GetContext/main.go index 0b6dfa686a8..543d203c732 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/GetContext/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/GetContext/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ContextsClient_GetContext] +// [START dialogflow_v2_generated_Contexts_GetContext_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ContextsClient_GetContext] +// [END dialogflow_v2_generated_Contexts_GetContext_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/ListContexts/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/ListContexts/main.go index 499c8bf49d8..d752a20c562 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/ListContexts/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/ListContexts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ContextsClient_ListContexts] +// [START dialogflow_v2_generated_Contexts_ListContexts_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ContextsClient_ListContexts] +// [END dialogflow_v2_generated_Contexts_ListContexts_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/NewContextsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/NewContextsClient/main.go deleted file mode 100644 index 892e49553d9..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/NewContextsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewContextsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewContextsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewContextsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/UpdateContext/main.go b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/UpdateContext/main.go index d41a273b240..2aa94c1cb10 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ContextsClient/UpdateContext/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ContextsClient/UpdateContext/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ContextsClient_UpdateContext] +// [START dialogflow_v2_generated_Contexts_UpdateContext_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ContextsClient_UpdateContext] +// [END dialogflow_v2_generated_Contexts_UpdateContext_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/CreateConversationProfile/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/CreateConversationProfile/main.go index d3d73c4fc4c..801ef8d9d55 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/CreateConversationProfile/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/CreateConversationProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_CreateConversationProfile] +// [START dialogflow_v2_generated_ConversationProfiles_CreateConversationProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_CreateConversationProfile] +// [END dialogflow_v2_generated_ConversationProfiles_CreateConversationProfile_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/DeleteConversationProfile/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/DeleteConversationProfile/main.go index 40d1c303b21..6098bd744ed 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/DeleteConversationProfile/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/DeleteConversationProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_DeleteConversationProfile] +// [START dialogflow_v2_generated_ConversationProfiles_DeleteConversationProfile_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_DeleteConversationProfile] +// [END dialogflow_v2_generated_ConversationProfiles_DeleteConversationProfile_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/GetConversationProfile/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/GetConversationProfile/main.go index df3716f4d63..4e3f3ecda70 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/GetConversationProfile/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/GetConversationProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_GetConversationProfile] +// [START dialogflow_v2_generated_ConversationProfiles_GetConversationProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_GetConversationProfile] +// [END dialogflow_v2_generated_ConversationProfiles_GetConversationProfile_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/ListConversationProfiles/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/ListConversationProfiles/main.go index 22e4376d8dd..d75f051b5cb 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/ListConversationProfiles/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/ListConversationProfiles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_ListConversationProfiles] +// [START dialogflow_v2_generated_ConversationProfiles_ListConversationProfiles_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_ListConversationProfiles] +// [END dialogflow_v2_generated_ConversationProfiles_ListConversationProfiles_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/NewConversationProfilesClient/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/NewConversationProfilesClient/main.go deleted file mode 100644 index b24bee071e3..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/NewConversationProfilesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewConversationProfilesClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewConversationProfilesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewConversationProfilesClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/UpdateConversationProfile/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/UpdateConversationProfile/main.go index 89be9bbd67f..354a3320d4c 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/UpdateConversationProfile/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationProfilesClient/UpdateConversationProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_UpdateConversationProfile] +// [START dialogflow_v2_generated_ConversationProfiles_UpdateConversationProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ConversationProfilesClient_UpdateConversationProfile] +// [END dialogflow_v2_generated_ConversationProfiles_UpdateConversationProfile_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CompleteConversation/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CompleteConversation/main.go index ceeb1f3e61b..12aa448b704 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CompleteConversation/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CompleteConversation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationsClient_CompleteConversation] +// [START dialogflow_v2_generated_Conversations_CompleteConversation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ConversationsClient_CompleteConversation] +// [END dialogflow_v2_generated_Conversations_CompleteConversation_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CreateConversation/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CreateConversation/main.go index 434f8bf72d2..aa4e8bd041d 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CreateConversation/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/CreateConversation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationsClient_CreateConversation] +// [START dialogflow_v2_generated_Conversations_CreateConversation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ConversationsClient_CreateConversation] +// [END dialogflow_v2_generated_Conversations_CreateConversation_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/GetConversation/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/GetConversation/main.go index 1073d3ea428..c489e3f8fb4 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/GetConversation/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/GetConversation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationsClient_GetConversation] +// [START dialogflow_v2_generated_Conversations_GetConversation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ConversationsClient_GetConversation] +// [END dialogflow_v2_generated_Conversations_GetConversation_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListConversations/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListConversations/main.go index e6beb496ac0..78cf14cd7cf 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListConversations/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListConversations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationsClient_ListConversations] +// [START dialogflow_v2_generated_Conversations_ListConversations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ConversationsClient_ListConversations] +// [END dialogflow_v2_generated_Conversations_ListConversations_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListMessages/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListMessages/main.go index b5aa06f18a1..fdbc330a1d9 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListMessages/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/ListMessages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ConversationsClient_ListMessages] +// [START dialogflow_v2_generated_Conversations_ListMessages_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ConversationsClient_ListMessages] +// [END dialogflow_v2_generated_Conversations_ListMessages_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/NewConversationsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/NewConversationsClient/main.go deleted file mode 100644 index 7e39079f09f..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/ConversationsClient/NewConversationsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewConversationsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewConversationsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewConversationsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/CreateDocument/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/CreateDocument/main.go index 3c56cce883a..5847013627a 100644 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/CreateDocument/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/CreateDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_DocumentsClient_CreateDocument] +// [START dialogflow_v2_generated_Documents_CreateDocument_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_DocumentsClient_CreateDocument] +// [END dialogflow_v2_generated_Documents_CreateDocument_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/DeleteDocument/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/DeleteDocument/main.go index 623ca7b298f..7e2cce86547 100644 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/DeleteDocument/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/DeleteDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_DocumentsClient_DeleteDocument] +// [START dialogflow_v2_generated_Documents_DeleteDocument_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_DocumentsClient_DeleteDocument] +// [END dialogflow_v2_generated_Documents_DeleteDocument_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/GetDocument/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/GetDocument/main.go index a5eb07822e2..9596f1f0a2a 100644 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/GetDocument/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/GetDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_DocumentsClient_GetDocument] +// [START dialogflow_v2_generated_Documents_GetDocument_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_DocumentsClient_GetDocument] +// [END dialogflow_v2_generated_Documents_GetDocument_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ListDocuments/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ListDocuments/main.go index c42a37edbe7..bded0b1c7e8 100644 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ListDocuments/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ListDocuments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_DocumentsClient_ListDocuments] +// [START dialogflow_v2_generated_Documents_ListDocuments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_DocumentsClient_ListDocuments] +// [END dialogflow_v2_generated_Documents_ListDocuments_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/NewDocumentsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/NewDocumentsClient/main.go deleted file mode 100644 index f823c07fb38..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/NewDocumentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewDocumentsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewDocumentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewDocumentsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ReloadDocument/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ReloadDocument/main.go index 3bdd5ff4000..bb0299e9408 100644 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ReloadDocument/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ReloadDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_DocumentsClient_ReloadDocument] +// [START dialogflow_v2_generated_Documents_ReloadDocument_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_DocumentsClient_ReloadDocument] +// [END dialogflow_v2_generated_Documents_ReloadDocument_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/UpdateDocument/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/UpdateDocument/main.go index 20aaf7cda1a..8f470e69780 100644 --- a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/UpdateDocument/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/UpdateDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_DocumentsClient_UpdateDocument] +// [START dialogflow_v2_generated_Documents_UpdateDocument_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_DocumentsClient_UpdateDocument] +// [END dialogflow_v2_generated_Documents_UpdateDocument_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchCreateEntities/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchCreateEntities/main.go index 300ee469fb0..a969a4f5bbb 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchCreateEntities/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchCreateEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchCreateEntities] +// [START dialogflow_v2_generated_EntityTypes_BatchCreateEntities_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchCreateEntities] +// [END dialogflow_v2_generated_EntityTypes_BatchCreateEntities_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntities/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntities/main.go index c0d27cdb7ce..ff803ed5303 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntities/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchDeleteEntities] +// [START dialogflow_v2_generated_EntityTypes_BatchDeleteEntities_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchDeleteEntities] +// [END dialogflow_v2_generated_EntityTypes_BatchDeleteEntities_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntityTypes/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntityTypes/main.go index 019f490edb3..9247b9f1c69 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchDeleteEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchDeleteEntityTypes] +// [START dialogflow_v2_generated_EntityTypes_BatchDeleteEntityTypes_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchDeleteEntityTypes] +// [END dialogflow_v2_generated_EntityTypes_BatchDeleteEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntities/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntities/main.go index 17ba11ee3d8..dc53345fafb 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntities/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchUpdateEntities] +// [START dialogflow_v2_generated_EntityTypes_BatchUpdateEntities_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchUpdateEntities] +// [END dialogflow_v2_generated_EntityTypes_BatchUpdateEntities_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntityTypes/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntityTypes/main.go index 0ee8e0f953a..be66d5efaa5 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/BatchUpdateEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchUpdateEntityTypes] +// [START dialogflow_v2_generated_EntityTypes_BatchUpdateEntityTypes_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_BatchUpdateEntityTypes] +// [END dialogflow_v2_generated_EntityTypes_BatchUpdateEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/CreateEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/CreateEntityType/main.go index 884b9707512..588064811d0 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/CreateEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/CreateEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_CreateEntityType] +// [START dialogflow_v2_generated_EntityTypes_CreateEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_CreateEntityType] +// [END dialogflow_v2_generated_EntityTypes_CreateEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/DeleteEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/DeleteEntityType/main.go index d9b7a2b813d..0ccf9f42eea 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/DeleteEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/DeleteEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_DeleteEntityType] +// [START dialogflow_v2_generated_EntityTypes_DeleteEntityType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_DeleteEntityType] +// [END dialogflow_v2_generated_EntityTypes_DeleteEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/GetEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/GetEntityType/main.go index 4370a880f97..006f740b3fd 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/GetEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/GetEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_GetEntityType] +// [START dialogflow_v2_generated_EntityTypes_GetEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_GetEntityType] +// [END dialogflow_v2_generated_EntityTypes_GetEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/ListEntityTypes/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/ListEntityTypes/main.go index 272bf8f8d37..934a934a2f4 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/ListEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/ListEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_ListEntityTypes] +// [START dialogflow_v2_generated_EntityTypes_ListEntityTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_ListEntityTypes] +// [END dialogflow_v2_generated_EntityTypes_ListEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/NewEntityTypesClient/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/NewEntityTypesClient/main.go deleted file mode 100644 index 1b06e5c5f1e..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/NewEntityTypesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewEntityTypesClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewEntityTypesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewEntityTypesClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/UpdateEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/UpdateEntityType/main.go index cafcbc8632d..2fea84b1324 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/UpdateEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EntityTypesClient/UpdateEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EntityTypesClient_UpdateEntityType] +// [START dialogflow_v2_generated_EntityTypes_UpdateEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_EntityTypesClient_UpdateEntityType] +// [END dialogflow_v2_generated_EntityTypes_UpdateEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/ListEnvironments/main.go b/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/ListEnvironments/main.go index 3e3199c4305..fcb66910f7b 100644 --- a/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/ListEnvironments/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/ListEnvironments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_EnvironmentsClient_ListEnvironments] +// [START dialogflow_v2_generated_Environments_ListEnvironments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_EnvironmentsClient_ListEnvironments] +// [END dialogflow_v2_generated_Environments_ListEnvironments_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/NewEnvironmentsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/NewEnvironmentsClient/main.go deleted file mode 100644 index 87c00963488..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/EnvironmentsClient/NewEnvironmentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewEnvironmentsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewEnvironmentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewEnvironmentsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchDeleteIntents/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchDeleteIntents/main.go index 941425fc99e..c2f4b32d083 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchDeleteIntents/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchDeleteIntents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_BatchDeleteIntents] +// [START dialogflow_v2_generated_Intents_BatchDeleteIntents_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_BatchDeleteIntents] +// [END dialogflow_v2_generated_Intents_BatchDeleteIntents_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchUpdateIntents/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchUpdateIntents/main.go index 976e3d678d3..3489a1a061a 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchUpdateIntents/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/BatchUpdateIntents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_BatchUpdateIntents] +// [START dialogflow_v2_generated_Intents_BatchUpdateIntents_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_BatchUpdateIntents] +// [END dialogflow_v2_generated_Intents_BatchUpdateIntents_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/CreateIntent/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/CreateIntent/main.go index 2099dbc2cc3..81f7303944a 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/CreateIntent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/CreateIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_CreateIntent] +// [START dialogflow_v2_generated_Intents_CreateIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_CreateIntent] +// [END dialogflow_v2_generated_Intents_CreateIntent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/DeleteIntent/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/DeleteIntent/main.go index d25b915ad80..2c85cae0b61 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/DeleteIntent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/DeleteIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_DeleteIntent] +// [START dialogflow_v2_generated_Intents_DeleteIntent_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_DeleteIntent] +// [END dialogflow_v2_generated_Intents_DeleteIntent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/GetIntent/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/GetIntent/main.go index 93eb2bfb678..6a9d4808b6c 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/GetIntent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/GetIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_GetIntent] +// [START dialogflow_v2_generated_Intents_GetIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_GetIntent] +// [END dialogflow_v2_generated_Intents_GetIntent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/ListIntents/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/ListIntents/main.go index 5b9ba0ca52e..6db4b196cbe 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/ListIntents/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/ListIntents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_ListIntents] +// [START dialogflow_v2_generated_Intents_ListIntents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_ListIntents] +// [END dialogflow_v2_generated_Intents_ListIntents_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/NewIntentsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/NewIntentsClient/main.go deleted file mode 100644 index 7b8d3b2839f..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/NewIntentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewIntentsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewIntentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewIntentsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/UpdateIntent/main.go b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/UpdateIntent/main.go index 55f48ced594..5e9f484a0d9 100644 --- a/internal/generated/snippets/dialogflow/apiv2/IntentsClient/UpdateIntent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/IntentsClient/UpdateIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_IntentsClient_UpdateIntent] +// [START dialogflow_v2_generated_Intents_UpdateIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_IntentsClient_UpdateIntent] +// [END dialogflow_v2_generated_Intents_UpdateIntent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/CreateKnowledgeBase/main.go b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/CreateKnowledgeBase/main.go index f9bf7f6e61b..7757d1bd663 100644 --- a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/CreateKnowledgeBase/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/CreateKnowledgeBase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_CreateKnowledgeBase] +// [START dialogflow_v2_generated_KnowledgeBases_CreateKnowledgeBase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_CreateKnowledgeBase] +// [END dialogflow_v2_generated_KnowledgeBases_CreateKnowledgeBase_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/DeleteKnowledgeBase/main.go b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/DeleteKnowledgeBase/main.go index c820075c5ac..c148d95c5df 100644 --- a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/DeleteKnowledgeBase/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/DeleteKnowledgeBase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_DeleteKnowledgeBase] +// [START dialogflow_v2_generated_KnowledgeBases_DeleteKnowledgeBase_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_DeleteKnowledgeBase] +// [END dialogflow_v2_generated_KnowledgeBases_DeleteKnowledgeBase_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/GetKnowledgeBase/main.go b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/GetKnowledgeBase/main.go index 487c4fc36a6..f09a5067260 100644 --- a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/GetKnowledgeBase/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/GetKnowledgeBase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_GetKnowledgeBase] +// [START dialogflow_v2_generated_KnowledgeBases_GetKnowledgeBase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_GetKnowledgeBase] +// [END dialogflow_v2_generated_KnowledgeBases_GetKnowledgeBase_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/ListKnowledgeBases/main.go b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/ListKnowledgeBases/main.go index cd0f89dd2b9..87a25ac69a8 100644 --- a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/ListKnowledgeBases/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/ListKnowledgeBases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_ListKnowledgeBases] +// [START dialogflow_v2_generated_KnowledgeBases_ListKnowledgeBases_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_ListKnowledgeBases] +// [END dialogflow_v2_generated_KnowledgeBases_ListKnowledgeBases_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/NewKnowledgeBasesClient/main.go b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/NewKnowledgeBasesClient/main.go deleted file mode 100644 index 3aceb9254ea..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/NewKnowledgeBasesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewKnowledgeBasesClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewKnowledgeBasesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewKnowledgeBasesClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/UpdateKnowledgeBase/main.go b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/UpdateKnowledgeBase/main.go index cf5fce2d705..e2aa7b8ef48 100644 --- a/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/UpdateKnowledgeBase/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/KnowledgeBasesClient/UpdateKnowledgeBase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_UpdateKnowledgeBase] +// [START dialogflow_v2_generated_KnowledgeBases_UpdateKnowledgeBase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_KnowledgeBasesClient_UpdateKnowledgeBase] +// [END dialogflow_v2_generated_KnowledgeBases_UpdateKnowledgeBase_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/AnalyzeContent/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/AnalyzeContent/main.go index 06ec7f17b87..6d4c00cd6d5 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/AnalyzeContent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/AnalyzeContent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_AnalyzeContent] +// [START dialogflow_v2_generated_Participants_AnalyzeContent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_AnalyzeContent] +// [END dialogflow_v2_generated_Participants_AnalyzeContent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/CreateParticipant/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/CreateParticipant/main.go index eccdf654f39..36ff4fa4c14 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/CreateParticipant/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/CreateParticipant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_CreateParticipant] +// [START dialogflow_v2_generated_Participants_CreateParticipant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_CreateParticipant] +// [END dialogflow_v2_generated_Participants_CreateParticipant_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/GetParticipant/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/GetParticipant/main.go index ab03f7f7ff6..8acdf53de1e 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/GetParticipant/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/GetParticipant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_GetParticipant] +// [START dialogflow_v2_generated_Participants_GetParticipant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_GetParticipant] +// [END dialogflow_v2_generated_Participants_GetParticipant_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/ListParticipants/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/ListParticipants/main.go index 0b530de0e70..2dbd51395d4 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/ListParticipants/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/ListParticipants/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_ListParticipants] +// [START dialogflow_v2_generated_Participants_ListParticipants_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_ListParticipants] +// [END dialogflow_v2_generated_Participants_ListParticipants_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/NewParticipantsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/NewParticipantsClient/main.go deleted file mode 100644 index 99dab7c2e77..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/NewParticipantsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewParticipantsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewParticipantsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewParticipantsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestArticles/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestArticles/main.go index 7b7a8438580..55f1b5b8954 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestArticles/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestArticles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_SuggestArticles] +// [START dialogflow_v2_generated_Participants_SuggestArticles_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_SuggestArticles] +// [END dialogflow_v2_generated_Participants_SuggestArticles_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestFaqAnswers/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestFaqAnswers/main.go index c6cb265f5ef..8a8302301eb 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestFaqAnswers/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestFaqAnswers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_SuggestFaqAnswers] +// [START dialogflow_v2_generated_Participants_SuggestFaqAnswers_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_SuggestFaqAnswers] +// [END dialogflow_v2_generated_Participants_SuggestFaqAnswers_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/UpdateParticipant/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/UpdateParticipant/main.go index 7c6b21983d2..437b1aca659 100644 --- a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/UpdateParticipant/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/UpdateParticipant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_ParticipantsClient_UpdateParticipant] +// [START dialogflow_v2_generated_Participants_UpdateParticipant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_ParticipantsClient_UpdateParticipant] +// [END dialogflow_v2_generated_Participants_UpdateParticipant_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/CreateSessionEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/CreateSessionEntityType/main.go index 6bbfd91edd8..338a4dc4684 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/CreateSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/CreateSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_CreateSessionEntityType] +// [START dialogflow_v2_generated_SessionEntityTypes_CreateSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_CreateSessionEntityType] +// [END dialogflow_v2_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/DeleteSessionEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/DeleteSessionEntityType/main.go index cfe50630a92..549e90ad9fb 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/DeleteSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/DeleteSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_DeleteSessionEntityType] +// [START dialogflow_v2_generated_SessionEntityTypes_DeleteSessionEntityType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_DeleteSessionEntityType] +// [END dialogflow_v2_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/GetSessionEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/GetSessionEntityType/main.go index 4127acc5469..8359d497094 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/GetSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/GetSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_GetSessionEntityType] +// [START dialogflow_v2_generated_SessionEntityTypes_GetSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_GetSessionEntityType] +// [END dialogflow_v2_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/ListSessionEntityTypes/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/ListSessionEntityTypes/main.go index 9d6bff2b231..1933e9884d5 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/ListSessionEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/ListSessionEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_ListSessionEntityTypes] +// [START dialogflow_v2_generated_SessionEntityTypes_ListSessionEntityTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_ListSessionEntityTypes] +// [END dialogflow_v2_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go deleted file mode 100644 index 87378850844..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewSessionEntityTypesClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewSessionEntityTypesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewSessionEntityTypesClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/UpdateSessionEntityType/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/UpdateSessionEntityType/main.go index 59f1ac603a3..9149517d4d3 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/UpdateSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionEntityTypesClient/UpdateSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_UpdateSessionEntityType] +// [START dialogflow_v2_generated_SessionEntityTypes_UpdateSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_SessionEntityTypesClient_UpdateSessionEntityType] +// [END dialogflow_v2_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionsClient/DetectIntent/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionsClient/DetectIntent/main.go index 847159ccb71..1ed24f6a2a2 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionsClient/DetectIntent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionsClient/DetectIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionsClient_DetectIntent] +// [START dialogflow_v2_generated_Sessions_DetectIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_apiv2_SessionsClient_DetectIntent] +// [END dialogflow_v2_generated_Sessions_DetectIntent_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionsClient/NewSessionsClient/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionsClient/NewSessionsClient/main.go deleted file mode 100644 index b7069e41d55..00000000000 --- a/internal/generated/snippets/dialogflow/apiv2/SessionsClient/NewSessionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_apiv2_NewSessionsClient] - -package main - -import ( - "context" - - dialogflow "cloud.google.com/go/dialogflow/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dialogflow.NewSessionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_apiv2_NewSessionsClient] diff --git a/internal/generated/snippets/dialogflow/apiv2/SessionsClient/StreamingDetectIntent/main.go b/internal/generated/snippets/dialogflow/apiv2/SessionsClient/StreamingDetectIntent/main.go index 1b898a31857..cb91f64b854 100644 --- a/internal/generated/snippets/dialogflow/apiv2/SessionsClient/StreamingDetectIntent/main.go +++ b/internal/generated/snippets/dialogflow/apiv2/SessionsClient/StreamingDetectIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_apiv2_SessionsClient_StreamingDetectIntent] +// [START dialogflow_v2_generated_Sessions_StreamingDetectIntent_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_apiv2_SessionsClient_StreamingDetectIntent] +// [END dialogflow_v2_generated_Sessions_StreamingDetectIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/CreateAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/CreateAgent/main.go index 5127fc428c4..ceca952aea6 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/CreateAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/CreateAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_CreateAgent] +// [START dialogflow_v3_generated_Agents_CreateAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_CreateAgent] +// [END dialogflow_v3_generated_Agents_CreateAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/DeleteAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/DeleteAgent/main.go index e7e5b56ee13..388be3727ff 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/DeleteAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/DeleteAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_DeleteAgent] +// [START dialogflow_v3_generated_Agents_DeleteAgent_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_DeleteAgent] +// [END dialogflow_v3_generated_Agents_DeleteAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ExportAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ExportAgent/main.go index 6b6e6fe9eaa..192f0791a93 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ExportAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ExportAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_ExportAgent] +// [START dialogflow_v3_generated_Agents_ExportAgent_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_ExportAgent] +// [END dialogflow_v3_generated_Agents_ExportAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgent/main.go index 098b43fe5e1..bf1a22477e3 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_GetAgent] +// [START dialogflow_v3_generated_Agents_GetAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_GetAgent] +// [END dialogflow_v3_generated_Agents_GetAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgentValidationResult/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgentValidationResult/main.go index cffa08b9f75..011e3475bac 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgentValidationResult/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/GetAgentValidationResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_GetAgentValidationResult] +// [START dialogflow_v3_generated_Agents_GetAgentValidationResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_GetAgentValidationResult] +// [END dialogflow_v3_generated_Agents_GetAgentValidationResult_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ListAgents/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ListAgents/main.go index 2674a60ee1c..71f6f82f19a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ListAgents/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ListAgents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_ListAgents] +// [START dialogflow_v3_generated_Agents_ListAgents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_ListAgents] +// [END dialogflow_v3_generated_Agents_ListAgents_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/NewAgentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/NewAgentsClient/main.go deleted file mode 100644 index e30907d6962..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/NewAgentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewAgentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewAgentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewAgentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/RestoreAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/RestoreAgent/main.go index cd44c99642d..0f59cb37a58 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/RestoreAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/RestoreAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_RestoreAgent] +// [START dialogflow_v3_generated_Agents_RestoreAgent_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_RestoreAgent] +// [END dialogflow_v3_generated_Agents_RestoreAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/UpdateAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/UpdateAgent/main.go index be23291cdd3..2bbfd17e1a3 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/UpdateAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/UpdateAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_UpdateAgent] +// [START dialogflow_v3_generated_Agents_UpdateAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_UpdateAgent] +// [END dialogflow_v3_generated_Agents_UpdateAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ValidateAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ValidateAgent/main.go index 9198190438f..42d8cd530ac 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ValidateAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/AgentsClient/ValidateAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_ValidateAgent] +// [START dialogflow_v3_generated_Agents_ValidateAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_AgentsClient_ValidateAgent] +// [END dialogflow_v3_generated_Agents_ValidateAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/CreateEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/CreateEntityType/main.go index 76a2ef350f8..63dcb4d6107 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/CreateEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/CreateEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_CreateEntityType] +// [START dialogflow_v3_generated_EntityTypes_CreateEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_CreateEntityType] +// [END dialogflow_v3_generated_EntityTypes_CreateEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/DeleteEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/DeleteEntityType/main.go index 360036ac2fb..9f6deae3d7b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/DeleteEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/DeleteEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_DeleteEntityType] +// [START dialogflow_v3_generated_EntityTypes_DeleteEntityType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_DeleteEntityType] +// [END dialogflow_v3_generated_EntityTypes_DeleteEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/GetEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/GetEntityType/main.go index f4456c90c2c..9623090ba55 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/GetEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/GetEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_GetEntityType] +// [START dialogflow_v3_generated_EntityTypes_GetEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_GetEntityType] +// [END dialogflow_v3_generated_EntityTypes_GetEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/ListEntityTypes/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/ListEntityTypes/main.go index 1ec61fefd24..0f74c291095 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/ListEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/ListEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_ListEntityTypes] +// [START dialogflow_v3_generated_EntityTypes_ListEntityTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_ListEntityTypes] +// [END dialogflow_v3_generated_EntityTypes_ListEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/NewEntityTypesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/NewEntityTypesClient/main.go deleted file mode 100644 index 9fdc66aa20a..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/NewEntityTypesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewEntityTypesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewEntityTypesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewEntityTypesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/UpdateEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/UpdateEntityType/main.go index 324b59b5b4b..b840aadda1a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/UpdateEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EntityTypesClient/UpdateEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_UpdateEntityType] +// [START dialogflow_v3_generated_EntityTypes_UpdateEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_EntityTypesClient_UpdateEntityType] +// [END dialogflow_v3_generated_EntityTypes_UpdateEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/CreateEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/CreateEnvironment/main.go index c76f77cc24e..ec45fc2dd88 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/CreateEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/CreateEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_CreateEnvironment] +// [START dialogflow_v3_generated_Environments_CreateEnvironment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_CreateEnvironment] +// [END dialogflow_v3_generated_Environments_CreateEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/DeleteEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/DeleteEnvironment/main.go index 936c8ffb7df..3ba1962ff00 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/DeleteEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/DeleteEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_DeleteEnvironment] +// [START dialogflow_v3_generated_Environments_DeleteEnvironment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_DeleteEnvironment] +// [END dialogflow_v3_generated_Environments_DeleteEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/GetEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/GetEnvironment/main.go index 919ef20c677..0b4e387b843 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/GetEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/GetEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_GetEnvironment] +// [START dialogflow_v3_generated_Environments_GetEnvironment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_GetEnvironment] +// [END dialogflow_v3_generated_Environments_GetEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/ListEnvironments/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/ListEnvironments/main.go index 0642330c2b6..d0595693699 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/ListEnvironments/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/ListEnvironments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_ListEnvironments] +// [START dialogflow_v3_generated_Environments_ListEnvironments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_ListEnvironments] +// [END dialogflow_v3_generated_Environments_ListEnvironments_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/LookupEnvironmentHistory/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/LookupEnvironmentHistory/main.go index 04417a21686..32f288df7a4 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/LookupEnvironmentHistory/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/LookupEnvironmentHistory/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_LookupEnvironmentHistory] +// [START dialogflow_v3_generated_Environments_LookupEnvironmentHistory_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_LookupEnvironmentHistory] +// [END dialogflow_v3_generated_Environments_LookupEnvironmentHistory_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/NewEnvironmentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/NewEnvironmentsClient/main.go deleted file mode 100644 index 54801a35360..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/NewEnvironmentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewEnvironmentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewEnvironmentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewEnvironmentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/UpdateEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/UpdateEnvironment/main.go index 0d4eeea103c..ba4103789a2 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/UpdateEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/EnvironmentsClient/UpdateEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_UpdateEnvironment] +// [START dialogflow_v3_generated_Environments_UpdateEnvironment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_EnvironmentsClient_UpdateEnvironment] +// [END dialogflow_v3_generated_Environments_UpdateEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/CreateExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/CreateExperiment/main.go index cdc730d2c4c..fb2ae805c77 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/CreateExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/CreateExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_CreateExperiment] +// [START dialogflow_v3_generated_Experiments_CreateExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_CreateExperiment] +// [END dialogflow_v3_generated_Experiments_CreateExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/DeleteExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/DeleteExperiment/main.go index 792dde96d6b..242c9e92aeb 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/DeleteExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/DeleteExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_DeleteExperiment] +// [START dialogflow_v3_generated_Experiments_DeleteExperiment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_DeleteExperiment] +// [END dialogflow_v3_generated_Experiments_DeleteExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/GetExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/GetExperiment/main.go index 8ace2943081..e60b22aa4c8 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/GetExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/GetExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_GetExperiment] +// [START dialogflow_v3_generated_Experiments_GetExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_GetExperiment] +// [END dialogflow_v3_generated_Experiments_GetExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/ListExperiments/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/ListExperiments/main.go index b12c4878b7b..73aa077a4f7 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/ListExperiments/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/ListExperiments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_ListExperiments] +// [START dialogflow_v3_generated_Experiments_ListExperiments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_ListExperiments] +// [END dialogflow_v3_generated_Experiments_ListExperiments_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/NewExperimentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/NewExperimentsClient/main.go deleted file mode 100644 index bdecf9c2b0d..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/NewExperimentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewExperimentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewExperimentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewExperimentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StartExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StartExperiment/main.go index 88e62506c39..d3fe4e6473a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StartExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StartExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_StartExperiment] +// [START dialogflow_v3_generated_Experiments_StartExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_StartExperiment] +// [END dialogflow_v3_generated_Experiments_StartExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StopExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StopExperiment/main.go index 31a1aefdbc1..836f6305189 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StopExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/StopExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_StopExperiment] +// [START dialogflow_v3_generated_Experiments_StopExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_StopExperiment] +// [END dialogflow_v3_generated_Experiments_StopExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/UpdateExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/UpdateExperiment/main.go index 6f2a9c35c81..7b9eae1a059 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/UpdateExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/ExperimentsClient/UpdateExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_UpdateExperiment] +// [START dialogflow_v3_generated_Experiments_UpdateExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_ExperimentsClient_UpdateExperiment] +// [END dialogflow_v3_generated_Experiments_UpdateExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/CreateFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/CreateFlow/main.go index 3bb39ec42fe..df3ae0b6071 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/CreateFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/CreateFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_CreateFlow] +// [START dialogflow_v3_generated_Flows_CreateFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_CreateFlow] +// [END dialogflow_v3_generated_Flows_CreateFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/DeleteFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/DeleteFlow/main.go index 9d32667731e..00f7585342b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/DeleteFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/DeleteFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_DeleteFlow] +// [START dialogflow_v3_generated_Flows_DeleteFlow_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_DeleteFlow] +// [END dialogflow_v3_generated_Flows_DeleteFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlow/main.go index 5b123060117..c2cbbe46f88 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_GetFlow] +// [START dialogflow_v3_generated_Flows_GetFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_GetFlow] +// [END dialogflow_v3_generated_Flows_GetFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlowValidationResult/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlowValidationResult/main.go index 101fe17693c..53e3004c16d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlowValidationResult/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/GetFlowValidationResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_GetFlowValidationResult] +// [START dialogflow_v3_generated_Flows_GetFlowValidationResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_GetFlowValidationResult] +// [END dialogflow_v3_generated_Flows_GetFlowValidationResult_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ListFlows/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ListFlows/main.go index dc92cb26eaa..0e0ff73003e 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ListFlows/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ListFlows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_ListFlows] +// [START dialogflow_v3_generated_Flows_ListFlows_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_ListFlows] +// [END dialogflow_v3_generated_Flows_ListFlows_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/NewFlowsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/NewFlowsClient/main.go deleted file mode 100644 index a84303d25c7..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/NewFlowsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewFlowsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewFlowsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewFlowsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/TrainFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/TrainFlow/main.go index 3dcf63438e6..d1ecf1baf2f 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/TrainFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/TrainFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_TrainFlow] +// [START dialogflow_v3_generated_Flows_TrainFlow_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_TrainFlow] +// [END dialogflow_v3_generated_Flows_TrainFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/UpdateFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/UpdateFlow/main.go index 121ed05517c..c43f44192f5 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/UpdateFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/UpdateFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_UpdateFlow] +// [START dialogflow_v3_generated_Flows_UpdateFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_UpdateFlow] +// [END dialogflow_v3_generated_Flows_UpdateFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ValidateFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ValidateFlow/main.go index ffe09dceefa..802d39394dc 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ValidateFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/FlowsClient/ValidateFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_ValidateFlow] +// [START dialogflow_v3_generated_Flows_ValidateFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_FlowsClient_ValidateFlow] +// [END dialogflow_v3_generated_Flows_ValidateFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/CreateIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/CreateIntent/main.go index 15dfd79cfdc..22a740ca161 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/CreateIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/CreateIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_CreateIntent] +// [START dialogflow_v3_generated_Intents_CreateIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_CreateIntent] +// [END dialogflow_v3_generated_Intents_CreateIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/DeleteIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/DeleteIntent/main.go index ae38d348732..8daeee403a5 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/DeleteIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/DeleteIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_DeleteIntent] +// [START dialogflow_v3_generated_Intents_DeleteIntent_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_DeleteIntent] +// [END dialogflow_v3_generated_Intents_DeleteIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/GetIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/GetIntent/main.go index 704d4293e19..d9936df80f1 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/GetIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/GetIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_GetIntent] +// [START dialogflow_v3_generated_Intents_GetIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_GetIntent] +// [END dialogflow_v3_generated_Intents_GetIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/ListIntents/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/ListIntents/main.go index f186c3dcfb9..ac4e9035f06 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/ListIntents/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/ListIntents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_ListIntents] +// [START dialogflow_v3_generated_Intents_ListIntents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_ListIntents] +// [END dialogflow_v3_generated_Intents_ListIntents_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/NewIntentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/NewIntentsClient/main.go deleted file mode 100644 index 8e427bc79d9..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/NewIntentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewIntentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewIntentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewIntentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/UpdateIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/UpdateIntent/main.go index 3bd5618c033..e7f4245c249 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/UpdateIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/IntentsClient/UpdateIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_UpdateIntent] +// [START dialogflow_v3_generated_Intents_UpdateIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_IntentsClient_UpdateIntent] +// [END dialogflow_v3_generated_Intents_UpdateIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/CreatePage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/CreatePage/main.go index 021cfef946f..9dc562bfe0e 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/CreatePage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/CreatePage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_PagesClient_CreatePage] +// [START dialogflow_v3_generated_Pages_CreatePage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_PagesClient_CreatePage] +// [END dialogflow_v3_generated_Pages_CreatePage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/DeletePage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/DeletePage/main.go index d77c42d6a8d..90df3ff40fe 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/DeletePage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/DeletePage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_PagesClient_DeletePage] +// [START dialogflow_v3_generated_Pages_DeletePage_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_PagesClient_DeletePage] +// [END dialogflow_v3_generated_Pages_DeletePage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/GetPage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/GetPage/main.go index 2e1e35c1016..847c1f380ee 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/GetPage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/GetPage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_PagesClient_GetPage] +// [START dialogflow_v3_generated_Pages_GetPage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_PagesClient_GetPage] +// [END dialogflow_v3_generated_Pages_GetPage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/ListPages/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/ListPages/main.go index d25b41d21ac..ba8f14e1956 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/ListPages/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/ListPages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_PagesClient_ListPages] +// [START dialogflow_v3_generated_Pages_ListPages_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_PagesClient_ListPages] +// [END dialogflow_v3_generated_Pages_ListPages_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/NewPagesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/NewPagesClient/main.go deleted file mode 100644 index 5510a94c863..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/NewPagesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewPagesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewPagesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewPagesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/UpdatePage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/UpdatePage/main.go index 42d5a08fc7d..ed8f2a36788 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/UpdatePage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/PagesClient/UpdatePage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_PagesClient_UpdatePage] +// [START dialogflow_v3_generated_Pages_UpdatePage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_PagesClient_UpdatePage] +// [END dialogflow_v3_generated_Pages_UpdatePage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/CreateSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/CreateSecuritySettings/main.go index cce890f8785..d578d024297 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/CreateSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/CreateSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_CreateSecuritySettings] +// [START dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_CreateSecuritySettings] +// [END dialogflow_v3_generated_SecuritySettingsService_CreateSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/DeleteSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/DeleteSecuritySettings/main.go index 871eac58f85..cb0299beb3e 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/DeleteSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/DeleteSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_DeleteSecuritySettings] +// [START dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_DeleteSecuritySettings] +// [END dialogflow_v3_generated_SecuritySettingsService_DeleteSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/GetSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/GetSecuritySettings/main.go index 667f4172282..6b09089b8b0 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/GetSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/GetSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_GetSecuritySettings] +// [START dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_GetSecuritySettings] +// [END dialogflow_v3_generated_SecuritySettingsService_GetSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/ListSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/ListSecuritySettings/main.go index 06896cb5b97..cdee88e9800 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/ListSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/ListSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_ListSecuritySettings] +// [START dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_ListSecuritySettings] +// [END dialogflow_v3_generated_SecuritySettingsService_ListSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/NewSecuritySettingsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/NewSecuritySettingsClient/main.go deleted file mode 100644 index 989c6f1be5a..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/NewSecuritySettingsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewSecuritySettingsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewSecuritySettingsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewSecuritySettingsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/UpdateSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/UpdateSecuritySettings/main.go index 0f88d940d03..16e426f97d5 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/UpdateSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SecuritySettingsClient/UpdateSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_UpdateSecuritySettings] +// [START dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SecuritySettingsClient_UpdateSecuritySettings] +// [END dialogflow_v3_generated_SecuritySettingsService_UpdateSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/CreateSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/CreateSessionEntityType/main.go index 92c2efbd230..57aaf3383a4 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/CreateSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/CreateSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_CreateSessionEntityType] +// [START dialogflow_v3_generated_SessionEntityTypes_CreateSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_CreateSessionEntityType] +// [END dialogflow_v3_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/DeleteSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/DeleteSessionEntityType/main.go index e2922b8c741..29d2de08cd0 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/DeleteSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/DeleteSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_DeleteSessionEntityType] +// [START dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_DeleteSessionEntityType] +// [END dialogflow_v3_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/GetSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/GetSessionEntityType/main.go index 50cf2542f0c..2a145715d55 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/GetSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/GetSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_GetSessionEntityType] +// [START dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_GetSessionEntityType] +// [END dialogflow_v3_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/ListSessionEntityTypes/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/ListSessionEntityTypes/main.go index 74af0fde9fd..c094d7e0acb 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/ListSessionEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/ListSessionEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_ListSessionEntityTypes] +// [START dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_ListSessionEntityTypes] +// [END dialogflow_v3_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go deleted file mode 100644 index 0d6d19f58c0..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewSessionEntityTypesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewSessionEntityTypesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewSessionEntityTypesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/UpdateSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/UpdateSessionEntityType/main.go index 147858620c6..4303c6c154b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/UpdateSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionEntityTypesClient/UpdateSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_UpdateSessionEntityType] +// [START dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionEntityTypesClient_UpdateSessionEntityType] +// [END dialogflow_v3_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/DetectIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/DetectIntent/main.go index f93e133e34d..e7aea12151b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/DetectIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/DetectIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_DetectIntent] +// [START dialogflow_v3_generated_Sessions_DetectIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_DetectIntent] +// [END dialogflow_v3_generated_Sessions_DetectIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/FulfillIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/FulfillIntent/main.go index dfa8e84247a..0b8662e6f5a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/FulfillIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/FulfillIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_FulfillIntent] +// [START dialogflow_v3_generated_Sessions_FulfillIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_FulfillIntent] +// [END dialogflow_v3_generated_Sessions_FulfillIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/MatchIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/MatchIntent/main.go index 64c082a303d..9da7d57f49c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/MatchIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/MatchIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_MatchIntent] +// [START dialogflow_v3_generated_Sessions_MatchIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_MatchIntent] +// [END dialogflow_v3_generated_Sessions_MatchIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/NewSessionsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/NewSessionsClient/main.go deleted file mode 100644 index 33fe0699200..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/NewSessionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewSessionsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewSessionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewSessionsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/StreamingDetectIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/StreamingDetectIntent/main.go index ff6e99a0450..a8a66e54890 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/StreamingDetectIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/SessionsClient/StreamingDetectIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_StreamingDetectIntent] +// [START dialogflow_v3_generated_Sessions_StreamingDetectIntent_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_SessionsClient_StreamingDetectIntent] +// [END dialogflow_v3_generated_Sessions_StreamingDetectIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchDeleteTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchDeleteTestCases/main.go index cbbaaf0fc80..8a3a3c0becf 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchDeleteTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchDeleteTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_BatchDeleteTestCases] +// [START dialogflow_v3_generated_TestCases_BatchDeleteTestCases_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_BatchDeleteTestCases] +// [END dialogflow_v3_generated_TestCases_BatchDeleteTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchRunTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchRunTestCases/main.go index c92572dae86..e1b02786e21 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchRunTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/BatchRunTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_BatchRunTestCases] +// [START dialogflow_v3_generated_TestCases_BatchRunTestCases_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_BatchRunTestCases] +// [END dialogflow_v3_generated_TestCases_BatchRunTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CalculateCoverage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CalculateCoverage/main.go index a95525d67c3..ccb2a01fdb1 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CalculateCoverage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CalculateCoverage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_CalculateCoverage] +// [START dialogflow_v3_generated_TestCases_CalculateCoverage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_CalculateCoverage] +// [END dialogflow_v3_generated_TestCases_CalculateCoverage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CreateTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CreateTestCase/main.go index 653ddd4c5de..4fa1be04fa4 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CreateTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/CreateTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_CreateTestCase] +// [START dialogflow_v3_generated_TestCases_CreateTestCase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_CreateTestCase] +// [END dialogflow_v3_generated_TestCases_CreateTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ExportTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ExportTestCases/main.go index 074c97a20ad..a1814fae69a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ExportTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ExportTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ExportTestCases] +// [START dialogflow_v3_generated_TestCases_ExportTestCases_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ExportTestCases] +// [END dialogflow_v3_generated_TestCases_ExportTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCase/main.go index 83e1ff5e06b..f1c7349a35b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_GetTestCase] +// [START dialogflow_v3_generated_TestCases_GetTestCase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_GetTestCase] +// [END dialogflow_v3_generated_TestCases_GetTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCaseResult/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCaseResult/main.go index 0b109adb6d1..bd2acbf64d8 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCaseResult/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/GetTestCaseResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_GetTestCaseResult] +// [START dialogflow_v3_generated_TestCases_GetTestCaseResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_GetTestCaseResult] +// [END dialogflow_v3_generated_TestCases_GetTestCaseResult_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ImportTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ImportTestCases/main.go index 07580c6803a..1d40ff9718b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ImportTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ImportTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ImportTestCases] +// [START dialogflow_v3_generated_TestCases_ImportTestCases_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ImportTestCases] +// [END dialogflow_v3_generated_TestCases_ImportTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCaseResults/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCaseResults/main.go index 44d401e26f5..15096b2233e 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCaseResults/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCaseResults/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ListTestCaseResults] +// [START dialogflow_v3_generated_TestCases_ListTestCaseResults_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ListTestCaseResults] +// [END dialogflow_v3_generated_TestCases_ListTestCaseResults_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCases/main.go index 271366d807b..29c7fc8cb72 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/ListTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ListTestCases] +// [START dialogflow_v3_generated_TestCases_ListTestCases_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_ListTestCases] +// [END dialogflow_v3_generated_TestCases_ListTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/NewTestCasesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/NewTestCasesClient/main.go deleted file mode 100644 index 4a79cad1030..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/NewTestCasesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewTestCasesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewTestCasesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewTestCasesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/RunTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/RunTestCase/main.go index 408ef282a9d..809b5494439 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/RunTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/RunTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_RunTestCase] +// [START dialogflow_v3_generated_TestCases_RunTestCase_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_RunTestCase] +// [END dialogflow_v3_generated_TestCases_RunTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/UpdateTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/UpdateTestCase/main.go index a5d50155bae..6716b92a7ae 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/UpdateTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TestCasesClient/UpdateTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_UpdateTestCase] +// [START dialogflow_v3_generated_TestCases_UpdateTestCase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TestCasesClient_UpdateTestCase] +// [END dialogflow_v3_generated_TestCases_UpdateTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go index 9e783227f08..aebf6aa73ec 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_CreateTransitionRouteGroup] +// [START dialogflow_v3_generated_TransitionRouteGroups_CreateTransitionRouteGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_CreateTransitionRouteGroup] +// [END dialogflow_v3_generated_TransitionRouteGroups_CreateTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go index 7edeaac03c0..efc56e0ce88 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_DeleteTransitionRouteGroup] +// [START dialogflow_v3_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_DeleteTransitionRouteGroup] +// [END dialogflow_v3_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go index 107f9f2a25d..916bbc6f204 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_GetTransitionRouteGroup] +// [START dialogflow_v3_generated_TransitionRouteGroups_GetTransitionRouteGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_GetTransitionRouteGroup] +// [END dialogflow_v3_generated_TransitionRouteGroups_GetTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go index 246e0379bc1..d30dc8cf5ef 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_ListTransitionRouteGroups] +// [START dialogflow_v3_generated_TransitionRouteGroups_ListTransitionRouteGroups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_ListTransitionRouteGroups] +// [END dialogflow_v3_generated_TransitionRouteGroups_ListTransitionRouteGroups_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/NewTransitionRouteGroupsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/NewTransitionRouteGroupsClient/main.go deleted file mode 100644 index 2f1c9591edf..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/NewTransitionRouteGroupsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewTransitionRouteGroupsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewTransitionRouteGroupsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewTransitionRouteGroupsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go index 6954bd9e6fd..9779be160ab 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_UpdateTransitionRouteGroup] +// [START dialogflow_v3_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_TransitionRouteGroupsClient_UpdateTransitionRouteGroup] +// [END dialogflow_v3_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CreateVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CreateVersion/main.go index eee91af460a..00ed2521dff 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CreateVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CreateVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_CreateVersion] +// [START dialogflow_v3_generated_Versions_CreateVersion_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_CreateVersion] +// [END dialogflow_v3_generated_Versions_CreateVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/DeleteVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/DeleteVersion/main.go index 1cf53f7c4d2..68590e67a1b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/DeleteVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/DeleteVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_DeleteVersion] +// [START dialogflow_v3_generated_Versions_DeleteVersion_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_DeleteVersion] +// [END dialogflow_v3_generated_Versions_DeleteVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/GetVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/GetVersion/main.go index bda6d5adddc..6d311c90749 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/GetVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/GetVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_GetVersion] +// [START dialogflow_v3_generated_Versions_GetVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_GetVersion] +// [END dialogflow_v3_generated_Versions_GetVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/ListVersions/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/ListVersions/main.go index 2061a22e270..21ae804fdc5 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/ListVersions/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/ListVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_ListVersions] +// [START dialogflow_v3_generated_Versions_ListVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_ListVersions] +// [END dialogflow_v3_generated_Versions_ListVersions_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/LoadVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/LoadVersion/main.go index 76c8009ae52..0dce06fb869 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/LoadVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/LoadVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_LoadVersion] +// [START dialogflow_v3_generated_Versions_LoadVersion_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_LoadVersion] +// [END dialogflow_v3_generated_Versions_LoadVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/NewVersionsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/NewVersionsClient/main.go deleted file mode 100644 index 74fe3ee175e..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/NewVersionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewVersionsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewVersionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewVersionsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/UpdateVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/UpdateVersion/main.go index 395ca42b067..f065977395d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/UpdateVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/UpdateVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_UpdateVersion] +// [START dialogflow_v3_generated_Versions_UpdateVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_VersionsClient_UpdateVersion] +// [END dialogflow_v3_generated_Versions_UpdateVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/CreateWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/CreateWebhook/main.go index b60aa47716d..477c8f9711e 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/CreateWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/CreateWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_CreateWebhook] +// [START dialogflow_v3_generated_Webhooks_CreateWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_CreateWebhook] +// [END dialogflow_v3_generated_Webhooks_CreateWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/DeleteWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/DeleteWebhook/main.go index a2e700e10e6..64472532311 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/DeleteWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/DeleteWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_DeleteWebhook] +// [START dialogflow_v3_generated_Webhooks_DeleteWebhook_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_DeleteWebhook] +// [END dialogflow_v3_generated_Webhooks_DeleteWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/GetWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/GetWebhook/main.go index 375108cf327..c51d7bcaf7f 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/GetWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/GetWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_GetWebhook] +// [START dialogflow_v3_generated_Webhooks_GetWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_GetWebhook] +// [END dialogflow_v3_generated_Webhooks_GetWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/ListWebhooks/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/ListWebhooks/main.go index 64e6d3c13b8..8f990dab09b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/ListWebhooks/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/ListWebhooks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_ListWebhooks] +// [START dialogflow_v3_generated_Webhooks_ListWebhooks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_ListWebhooks] +// [END dialogflow_v3_generated_Webhooks_ListWebhooks_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/NewWebhooksClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/NewWebhooksClient/main.go deleted file mode 100644 index 88ef44bfdba..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/NewWebhooksClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3_NewWebhooksClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3" -) - -func main() { - ctx := context.Background() - c, err := cx.NewWebhooksClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3_NewWebhooksClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/UpdateWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/UpdateWebhook/main.go index c02e1994e6b..ae6c9b2f222 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/UpdateWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3/WebhooksClient/UpdateWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_UpdateWebhook] +// [START dialogflow_v3_generated_Webhooks_UpdateWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3_WebhooksClient_UpdateWebhook] +// [END dialogflow_v3_generated_Webhooks_UpdateWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/CreateAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/CreateAgent/main.go index 8aa898686b6..acbf7883958 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/CreateAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/CreateAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_CreateAgent] +// [START dialogflow_v3beta1_generated_Agents_CreateAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_CreateAgent] +// [END dialogflow_v3beta1_generated_Agents_CreateAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/DeleteAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/DeleteAgent/main.go index 4623ad0543c..8587774e7fa 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/DeleteAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/DeleteAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_DeleteAgent] +// [START dialogflow_v3beta1_generated_Agents_DeleteAgent_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_DeleteAgent] +// [END dialogflow_v3beta1_generated_Agents_DeleteAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ExportAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ExportAgent/main.go index 70a0c1459a7..af740a7057f 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ExportAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ExportAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_ExportAgent] +// [START dialogflow_v3beta1_generated_Agents_ExportAgent_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_ExportAgent] +// [END dialogflow_v3beta1_generated_Agents_ExportAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgent/main.go index 3552678ca22..383615ecd34 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_GetAgent] +// [START dialogflow_v3beta1_generated_Agents_GetAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_GetAgent] +// [END dialogflow_v3beta1_generated_Agents_GetAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgentValidationResult/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgentValidationResult/main.go index dfa43b0adcf..e45d718d5ce 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgentValidationResult/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/GetAgentValidationResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_GetAgentValidationResult] +// [START dialogflow_v3beta1_generated_Agents_GetAgentValidationResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_GetAgentValidationResult] +// [END dialogflow_v3beta1_generated_Agents_GetAgentValidationResult_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ListAgents/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ListAgents/main.go index ffb65c40ad3..445acef362f 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ListAgents/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ListAgents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_ListAgents] +// [START dialogflow_v3beta1_generated_Agents_ListAgents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_ListAgents] +// [END dialogflow_v3beta1_generated_Agents_ListAgents_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/NewAgentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/NewAgentsClient/main.go deleted file mode 100644 index 038113b927b..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/NewAgentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewAgentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewAgentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewAgentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/RestoreAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/RestoreAgent/main.go index 5a4fda08090..de4f0b128ed 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/RestoreAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/RestoreAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_RestoreAgent] +// [START dialogflow_v3beta1_generated_Agents_RestoreAgent_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_RestoreAgent] +// [END dialogflow_v3beta1_generated_Agents_RestoreAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/UpdateAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/UpdateAgent/main.go index 05460ec0738..168a8217255 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/UpdateAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/UpdateAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_UpdateAgent] +// [START dialogflow_v3beta1_generated_Agents_UpdateAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_UpdateAgent] +// [END dialogflow_v3beta1_generated_Agents_UpdateAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ValidateAgent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ValidateAgent/main.go index 527987c4cdc..6964fde5f49 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ValidateAgent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/AgentsClient/ValidateAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_ValidateAgent] +// [START dialogflow_v3beta1_generated_Agents_ValidateAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_AgentsClient_ValidateAgent] +// [END dialogflow_v3beta1_generated_Agents_ValidateAgent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/CreateEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/CreateEntityType/main.go index 00afbb4cc67..46f4e636593 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/CreateEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/CreateEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_CreateEntityType] +// [START dialogflow_v3beta1_generated_EntityTypes_CreateEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_CreateEntityType] +// [END dialogflow_v3beta1_generated_EntityTypes_CreateEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/DeleteEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/DeleteEntityType/main.go index b856ae29cd9..1183bcaf986 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/DeleteEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/DeleteEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_DeleteEntityType] +// [START dialogflow_v3beta1_generated_EntityTypes_DeleteEntityType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_DeleteEntityType] +// [END dialogflow_v3beta1_generated_EntityTypes_DeleteEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/GetEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/GetEntityType/main.go index b269001c802..6f8c8fd8d79 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/GetEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/GetEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_GetEntityType] +// [START dialogflow_v3beta1_generated_EntityTypes_GetEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_GetEntityType] +// [END dialogflow_v3beta1_generated_EntityTypes_GetEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/ListEntityTypes/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/ListEntityTypes/main.go index 0d0ea8c8d74..57206df4b16 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/ListEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/ListEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_ListEntityTypes] +// [START dialogflow_v3beta1_generated_EntityTypes_ListEntityTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_ListEntityTypes] +// [END dialogflow_v3beta1_generated_EntityTypes_ListEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/NewEntityTypesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/NewEntityTypesClient/main.go deleted file mode 100644 index 0b6a75b549c..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/NewEntityTypesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewEntityTypesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewEntityTypesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewEntityTypesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/UpdateEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/UpdateEntityType/main.go index 2827a0cdb6e..83e0d58e8db 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/UpdateEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EntityTypesClient/UpdateEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_UpdateEntityType] +// [START dialogflow_v3beta1_generated_EntityTypes_UpdateEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EntityTypesClient_UpdateEntityType] +// [END dialogflow_v3beta1_generated_EntityTypes_UpdateEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/CreateEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/CreateEnvironment/main.go index 1578ae3ebef..6d4f9297c18 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/CreateEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/CreateEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_CreateEnvironment] +// [START dialogflow_v3beta1_generated_Environments_CreateEnvironment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_CreateEnvironment] +// [END dialogflow_v3beta1_generated_Environments_CreateEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/DeleteEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/DeleteEnvironment/main.go index caa2d224134..65287b286d7 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/DeleteEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/DeleteEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_DeleteEnvironment] +// [START dialogflow_v3beta1_generated_Environments_DeleteEnvironment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_DeleteEnvironment] +// [END dialogflow_v3beta1_generated_Environments_DeleteEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/GetEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/GetEnvironment/main.go index ad3fc9ca2e4..0a687c1c2ff 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/GetEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/GetEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_GetEnvironment] +// [START dialogflow_v3beta1_generated_Environments_GetEnvironment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_GetEnvironment] +// [END dialogflow_v3beta1_generated_Environments_GetEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/ListEnvironments/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/ListEnvironments/main.go index 71f7ca09549..d09ddaace9a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/ListEnvironments/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/ListEnvironments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_ListEnvironments] +// [START dialogflow_v3beta1_generated_Environments_ListEnvironments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_ListEnvironments] +// [END dialogflow_v3beta1_generated_Environments_ListEnvironments_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/LookupEnvironmentHistory/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/LookupEnvironmentHistory/main.go index 30a41925ac1..f498b47d438 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/LookupEnvironmentHistory/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/LookupEnvironmentHistory/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_LookupEnvironmentHistory] +// [START dialogflow_v3beta1_generated_Environments_LookupEnvironmentHistory_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_LookupEnvironmentHistory] +// [END dialogflow_v3beta1_generated_Environments_LookupEnvironmentHistory_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/NewEnvironmentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/NewEnvironmentsClient/main.go deleted file mode 100644 index c87befff1f8..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/NewEnvironmentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewEnvironmentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewEnvironmentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewEnvironmentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/UpdateEnvironment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/UpdateEnvironment/main.go index 3a029d2c366..f52c4122856 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/UpdateEnvironment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/EnvironmentsClient/UpdateEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_UpdateEnvironment] +// [START dialogflow_v3beta1_generated_Environments_UpdateEnvironment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_EnvironmentsClient_UpdateEnvironment] +// [END dialogflow_v3beta1_generated_Environments_UpdateEnvironment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/CreateExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/CreateExperiment/main.go index fba60fd4856..8367f4a6b9b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/CreateExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/CreateExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_CreateExperiment] +// [START dialogflow_v3beta1_generated_Experiments_CreateExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_CreateExperiment] +// [END dialogflow_v3beta1_generated_Experiments_CreateExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/DeleteExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/DeleteExperiment/main.go index 3abc1cc73fa..9fcb276c779 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/DeleteExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/DeleteExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_DeleteExperiment] +// [START dialogflow_v3beta1_generated_Experiments_DeleteExperiment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_DeleteExperiment] +// [END dialogflow_v3beta1_generated_Experiments_DeleteExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/GetExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/GetExperiment/main.go index cc31d11b5b4..2f24c35b04c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/GetExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/GetExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_GetExperiment] +// [START dialogflow_v3beta1_generated_Experiments_GetExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_GetExperiment] +// [END dialogflow_v3beta1_generated_Experiments_GetExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/ListExperiments/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/ListExperiments/main.go index 25b05462adb..e10be7de659 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/ListExperiments/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/ListExperiments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_ListExperiments] +// [START dialogflow_v3beta1_generated_Experiments_ListExperiments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_ListExperiments] +// [END dialogflow_v3beta1_generated_Experiments_ListExperiments_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/NewExperimentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/NewExperimentsClient/main.go deleted file mode 100644 index 63489bb8b1f..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/NewExperimentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewExperimentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewExperimentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewExperimentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StartExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StartExperiment/main.go index 3788bc54b1c..918fdfdd5e5 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StartExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StartExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_StartExperiment] +// [START dialogflow_v3beta1_generated_Experiments_StartExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_StartExperiment] +// [END dialogflow_v3beta1_generated_Experiments_StartExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StopExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StopExperiment/main.go index 6eafcfd5a4f..fdeac0ef878 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StopExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/StopExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_StopExperiment] +// [START dialogflow_v3beta1_generated_Experiments_StopExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_StopExperiment] +// [END dialogflow_v3beta1_generated_Experiments_StopExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/UpdateExperiment/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/UpdateExperiment/main.go index 0d0de6516d0..3db80010b5c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/UpdateExperiment/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/ExperimentsClient/UpdateExperiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_UpdateExperiment] +// [START dialogflow_v3beta1_generated_Experiments_UpdateExperiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_ExperimentsClient_UpdateExperiment] +// [END dialogflow_v3beta1_generated_Experiments_UpdateExperiment_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/CreateFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/CreateFlow/main.go index 2db7ba2421c..239d3ccc897 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/CreateFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/CreateFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_CreateFlow] +// [START dialogflow_v3beta1_generated_Flows_CreateFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_CreateFlow] +// [END dialogflow_v3beta1_generated_Flows_CreateFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/DeleteFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/DeleteFlow/main.go index 79fffb6bd12..0e5e7b057c3 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/DeleteFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/DeleteFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_DeleteFlow] +// [START dialogflow_v3beta1_generated_Flows_DeleteFlow_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_DeleteFlow] +// [END dialogflow_v3beta1_generated_Flows_DeleteFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlow/main.go index e420cf81ba5..ffa0ee4c3fc 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_GetFlow] +// [START dialogflow_v3beta1_generated_Flows_GetFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_GetFlow] +// [END dialogflow_v3beta1_generated_Flows_GetFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlowValidationResult/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlowValidationResult/main.go index d5f903de22a..812e92b7370 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlowValidationResult/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/GetFlowValidationResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_GetFlowValidationResult] +// [START dialogflow_v3beta1_generated_Flows_GetFlowValidationResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_GetFlowValidationResult] +// [END dialogflow_v3beta1_generated_Flows_GetFlowValidationResult_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ListFlows/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ListFlows/main.go index 3c880805124..ce064413871 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ListFlows/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ListFlows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_ListFlows] +// [START dialogflow_v3beta1_generated_Flows_ListFlows_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_ListFlows] +// [END dialogflow_v3beta1_generated_Flows_ListFlows_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/NewFlowsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/NewFlowsClient/main.go deleted file mode 100644 index b1b05c2d78a..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/NewFlowsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewFlowsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewFlowsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewFlowsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/TrainFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/TrainFlow/main.go index e8437987cda..9db42c1341d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/TrainFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/TrainFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_TrainFlow] +// [START dialogflow_v3beta1_generated_Flows_TrainFlow_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_TrainFlow] +// [END dialogflow_v3beta1_generated_Flows_TrainFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/UpdateFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/UpdateFlow/main.go index 376ab03ce1e..0fd4aae8edf 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/UpdateFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/UpdateFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_UpdateFlow] +// [START dialogflow_v3beta1_generated_Flows_UpdateFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_UpdateFlow] +// [END dialogflow_v3beta1_generated_Flows_UpdateFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ValidateFlow/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ValidateFlow/main.go index 4d0d91a6ad9..6c02e78653c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ValidateFlow/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/FlowsClient/ValidateFlow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_ValidateFlow] +// [START dialogflow_v3beta1_generated_Flows_ValidateFlow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_FlowsClient_ValidateFlow] +// [END dialogflow_v3beta1_generated_Flows_ValidateFlow_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/CreateIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/CreateIntent/main.go index eb888ccb4bc..8f5d18eb3d7 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/CreateIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/CreateIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_CreateIntent] +// [START dialogflow_v3beta1_generated_Intents_CreateIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_CreateIntent] +// [END dialogflow_v3beta1_generated_Intents_CreateIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/DeleteIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/DeleteIntent/main.go index 99ffeeb00b4..7c7b660d517 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/DeleteIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/DeleteIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_DeleteIntent] +// [START dialogflow_v3beta1_generated_Intents_DeleteIntent_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_DeleteIntent] +// [END dialogflow_v3beta1_generated_Intents_DeleteIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/GetIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/GetIntent/main.go index f454b05d007..6d18c633f6b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/GetIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/GetIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_GetIntent] +// [START dialogflow_v3beta1_generated_Intents_GetIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_GetIntent] +// [END dialogflow_v3beta1_generated_Intents_GetIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/ListIntents/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/ListIntents/main.go index 996d03ece0a..af0e2ddc14c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/ListIntents/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/ListIntents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_ListIntents] +// [START dialogflow_v3beta1_generated_Intents_ListIntents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_ListIntents] +// [END dialogflow_v3beta1_generated_Intents_ListIntents_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/NewIntentsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/NewIntentsClient/main.go deleted file mode 100644 index bafe51dc3dc..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/NewIntentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewIntentsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewIntentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewIntentsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/UpdateIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/UpdateIntent/main.go index 2df966e6147..a6a5b48483d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/UpdateIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/IntentsClient/UpdateIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_UpdateIntent] +// [START dialogflow_v3beta1_generated_Intents_UpdateIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_IntentsClient_UpdateIntent] +// [END dialogflow_v3beta1_generated_Intents_UpdateIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/CreatePage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/CreatePage/main.go index 9105f834f17..c84a87fe8d6 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/CreatePage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/CreatePage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_CreatePage] +// [START dialogflow_v3beta1_generated_Pages_CreatePage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_CreatePage] +// [END dialogflow_v3beta1_generated_Pages_CreatePage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/DeletePage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/DeletePage/main.go index d65e1c49c46..e60e461141c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/DeletePage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/DeletePage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_DeletePage] +// [START dialogflow_v3beta1_generated_Pages_DeletePage_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_DeletePage] +// [END dialogflow_v3beta1_generated_Pages_DeletePage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/GetPage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/GetPage/main.go index 035752abc02..6e1f94af419 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/GetPage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/GetPage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_GetPage] +// [START dialogflow_v3beta1_generated_Pages_GetPage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_GetPage] +// [END dialogflow_v3beta1_generated_Pages_GetPage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/ListPages/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/ListPages/main.go index 7838453eb7c..c427b904f5a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/ListPages/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/ListPages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_ListPages] +// [START dialogflow_v3beta1_generated_Pages_ListPages_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_ListPages] +// [END dialogflow_v3beta1_generated_Pages_ListPages_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/NewPagesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/NewPagesClient/main.go deleted file mode 100644 index eaa219fd8ff..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/NewPagesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewPagesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewPagesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewPagesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/UpdatePage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/UpdatePage/main.go index 92a8fa972b9..2ee4fbd88e9 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/UpdatePage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/PagesClient/UpdatePage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_UpdatePage] +// [START dialogflow_v3beta1_generated_Pages_UpdatePage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_PagesClient_UpdatePage] +// [END dialogflow_v3beta1_generated_Pages_UpdatePage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/CreateSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/CreateSecuritySettings/main.go index 6143c29f58d..3dd234562a6 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/CreateSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/CreateSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_CreateSecuritySettings] +// [START dialogflow_v3beta1_generated_SecuritySettingsService_CreateSecuritySettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_CreateSecuritySettings] +// [END dialogflow_v3beta1_generated_SecuritySettingsService_CreateSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/DeleteSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/DeleteSecuritySettings/main.go index d210db11edb..257a154308c 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/DeleteSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/DeleteSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_DeleteSecuritySettings] +// [START dialogflow_v3beta1_generated_SecuritySettingsService_DeleteSecuritySettings_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_DeleteSecuritySettings] +// [END dialogflow_v3beta1_generated_SecuritySettingsService_DeleteSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/GetSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/GetSecuritySettings/main.go index 48f6cb3f310..dfab8bb2d87 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/GetSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/GetSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_GetSecuritySettings] +// [START dialogflow_v3beta1_generated_SecuritySettingsService_GetSecuritySettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_GetSecuritySettings] +// [END dialogflow_v3beta1_generated_SecuritySettingsService_GetSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/ListSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/ListSecuritySettings/main.go index e2b6c881acc..200ebc3b085 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/ListSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/ListSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_ListSecuritySettings] +// [START dialogflow_v3beta1_generated_SecuritySettingsService_ListSecuritySettings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_ListSecuritySettings] +// [END dialogflow_v3beta1_generated_SecuritySettingsService_ListSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/NewSecuritySettingsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/NewSecuritySettingsClient/main.go deleted file mode 100644 index d65daebf611..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/NewSecuritySettingsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewSecuritySettingsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewSecuritySettingsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewSecuritySettingsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/UpdateSecuritySettings/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/UpdateSecuritySettings/main.go index d7329dc373a..ee90611da48 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/UpdateSecuritySettings/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SecuritySettingsClient/UpdateSecuritySettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_UpdateSecuritySettings] +// [START dialogflow_v3beta1_generated_SecuritySettingsService_UpdateSecuritySettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SecuritySettingsClient_UpdateSecuritySettings] +// [END dialogflow_v3beta1_generated_SecuritySettingsService_UpdateSecuritySettings_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/CreateSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/CreateSessionEntityType/main.go index e3f9596831d..198143a9216 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/CreateSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/CreateSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_CreateSessionEntityType] +// [START dialogflow_v3beta1_generated_SessionEntityTypes_CreateSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_CreateSessionEntityType] +// [END dialogflow_v3beta1_generated_SessionEntityTypes_CreateSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/DeleteSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/DeleteSessionEntityType/main.go index e3b27572215..ccd64f0a8a4 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/DeleteSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/DeleteSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_DeleteSessionEntityType] +// [START dialogflow_v3beta1_generated_SessionEntityTypes_DeleteSessionEntityType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_DeleteSessionEntityType] +// [END dialogflow_v3beta1_generated_SessionEntityTypes_DeleteSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/GetSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/GetSessionEntityType/main.go index 38e08d04923..f9d749974cc 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/GetSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/GetSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_GetSessionEntityType] +// [START dialogflow_v3beta1_generated_SessionEntityTypes_GetSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_GetSessionEntityType] +// [END dialogflow_v3beta1_generated_SessionEntityTypes_GetSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/ListSessionEntityTypes/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/ListSessionEntityTypes/main.go index 0f0a9e88c45..8883701cb42 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/ListSessionEntityTypes/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/ListSessionEntityTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_ListSessionEntityTypes] +// [START dialogflow_v3beta1_generated_SessionEntityTypes_ListSessionEntityTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_ListSessionEntityTypes] +// [END dialogflow_v3beta1_generated_SessionEntityTypes_ListSessionEntityTypes_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go deleted file mode 100644 index cb8509a1437..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/NewSessionEntityTypesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewSessionEntityTypesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewSessionEntityTypesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewSessionEntityTypesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/UpdateSessionEntityType/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/UpdateSessionEntityType/main.go index 8c3d8b58260..d07d5909fef 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/UpdateSessionEntityType/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionEntityTypesClient/UpdateSessionEntityType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_UpdateSessionEntityType] +// [START dialogflow_v3beta1_generated_SessionEntityTypes_UpdateSessionEntityType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionEntityTypesClient_UpdateSessionEntityType] +// [END dialogflow_v3beta1_generated_SessionEntityTypes_UpdateSessionEntityType_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/DetectIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/DetectIntent/main.go index 20cf6ecece2..eaecf2f4db3 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/DetectIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/DetectIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_DetectIntent] +// [START dialogflow_v3beta1_generated_Sessions_DetectIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_DetectIntent] +// [END dialogflow_v3beta1_generated_Sessions_DetectIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/FulfillIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/FulfillIntent/main.go index b3bf1ab2772..349b30b3f50 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/FulfillIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/FulfillIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_FulfillIntent] +// [START dialogflow_v3beta1_generated_Sessions_FulfillIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_FulfillIntent] +// [END dialogflow_v3beta1_generated_Sessions_FulfillIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/MatchIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/MatchIntent/main.go index 2a0ae477f91..903c6fca9f2 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/MatchIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/MatchIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_MatchIntent] +// [START dialogflow_v3beta1_generated_Sessions_MatchIntent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_MatchIntent] +// [END dialogflow_v3beta1_generated_Sessions_MatchIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/NewSessionsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/NewSessionsClient/main.go deleted file mode 100644 index 7fd638a4e72..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/NewSessionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewSessionsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewSessionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewSessionsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/StreamingDetectIntent/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/StreamingDetectIntent/main.go index e8c99c42ca3..b5147ac2226 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/StreamingDetectIntent/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/SessionsClient/StreamingDetectIntent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_StreamingDetectIntent] +// [START dialogflow_v3beta1_generated_Sessions_StreamingDetectIntent_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_SessionsClient_StreamingDetectIntent] +// [END dialogflow_v3beta1_generated_Sessions_StreamingDetectIntent_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchDeleteTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchDeleteTestCases/main.go index 6462e0dd77d..c801a1f8d18 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchDeleteTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchDeleteTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_BatchDeleteTestCases] +// [START dialogflow_v3beta1_generated_TestCases_BatchDeleteTestCases_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_BatchDeleteTestCases] +// [END dialogflow_v3beta1_generated_TestCases_BatchDeleteTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchRunTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchRunTestCases/main.go index f2f1e2c98d7..a25df284fee 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchRunTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/BatchRunTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_BatchRunTestCases] +// [START dialogflow_v3beta1_generated_TestCases_BatchRunTestCases_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_BatchRunTestCases] +// [END dialogflow_v3beta1_generated_TestCases_BatchRunTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CalculateCoverage/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CalculateCoverage/main.go index 7bf81e5aeba..31d9e7d9027 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CalculateCoverage/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CalculateCoverage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_CalculateCoverage] +// [START dialogflow_v3beta1_generated_TestCases_CalculateCoverage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_CalculateCoverage] +// [END dialogflow_v3beta1_generated_TestCases_CalculateCoverage_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CreateTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CreateTestCase/main.go index f305680dafb..4a8f19e9532 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CreateTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/CreateTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_CreateTestCase] +// [START dialogflow_v3beta1_generated_TestCases_CreateTestCase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_CreateTestCase] +// [END dialogflow_v3beta1_generated_TestCases_CreateTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ExportTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ExportTestCases/main.go index 7bb3b49c65c..c5c9b892875 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ExportTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ExportTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ExportTestCases] +// [START dialogflow_v3beta1_generated_TestCases_ExportTestCases_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ExportTestCases] +// [END dialogflow_v3beta1_generated_TestCases_ExportTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCase/main.go index e27b8c1bc15..607f28d9dad 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_GetTestCase] +// [START dialogflow_v3beta1_generated_TestCases_GetTestCase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_GetTestCase] +// [END dialogflow_v3beta1_generated_TestCases_GetTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCaseResult/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCaseResult/main.go index a0480880925..0d7f04c6100 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCaseResult/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/GetTestCaseResult/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_GetTestCaseResult] +// [START dialogflow_v3beta1_generated_TestCases_GetTestCaseResult_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_GetTestCaseResult] +// [END dialogflow_v3beta1_generated_TestCases_GetTestCaseResult_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ImportTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ImportTestCases/main.go index 3d0b53cd899..6b7f25d86f5 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ImportTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ImportTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ImportTestCases] +// [START dialogflow_v3beta1_generated_TestCases_ImportTestCases_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ImportTestCases] +// [END dialogflow_v3beta1_generated_TestCases_ImportTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCaseResults/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCaseResults/main.go index 37b23da8be1..5af235e7551 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCaseResults/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCaseResults/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ListTestCaseResults] +// [START dialogflow_v3beta1_generated_TestCases_ListTestCaseResults_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ListTestCaseResults] +// [END dialogflow_v3beta1_generated_TestCases_ListTestCaseResults_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCases/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCases/main.go index 2d07be3215a..497a4d17f88 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCases/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/ListTestCases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ListTestCases] +// [START dialogflow_v3beta1_generated_TestCases_ListTestCases_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_ListTestCases] +// [END dialogflow_v3beta1_generated_TestCases_ListTestCases_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/NewTestCasesClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/NewTestCasesClient/main.go deleted file mode 100644 index 060f1696ec9..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/NewTestCasesClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewTestCasesClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewTestCasesClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewTestCasesClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/RunTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/RunTestCase/main.go index 0d19928ab36..add3c04f6b1 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/RunTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/RunTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_RunTestCase] +// [START dialogflow_v3beta1_generated_TestCases_RunTestCase_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_RunTestCase] +// [END dialogflow_v3beta1_generated_TestCases_RunTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/UpdateTestCase/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/UpdateTestCase/main.go index 3e2134f0d2f..ac8dd0a5eda 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/UpdateTestCase/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TestCasesClient/UpdateTestCase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_UpdateTestCase] +// [START dialogflow_v3beta1_generated_TestCases_UpdateTestCase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TestCasesClient_UpdateTestCase] +// [END dialogflow_v3beta1_generated_TestCases_UpdateTestCase_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go index 1f300beb14f..5beaed25e39 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/CreateTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_CreateTransitionRouteGroup] +// [START dialogflow_v3beta1_generated_TransitionRouteGroups_CreateTransitionRouteGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_CreateTransitionRouteGroup] +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_CreateTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go index d3dba1ca4ba..41cb4cea3ee 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/DeleteTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_DeleteTransitionRouteGroup] +// [START dialogflow_v3beta1_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_DeleteTransitionRouteGroup] +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_DeleteTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go index a3e94ab3a82..9ee0f9beb91 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/GetTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_GetTransitionRouteGroup] +// [START dialogflow_v3beta1_generated_TransitionRouteGroups_GetTransitionRouteGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_GetTransitionRouteGroup] +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_GetTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go index 941979c76e5..50cb81cf306 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/ListTransitionRouteGroups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_ListTransitionRouteGroups] +// [START dialogflow_v3beta1_generated_TransitionRouteGroups_ListTransitionRouteGroups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_ListTransitionRouteGroups] +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_ListTransitionRouteGroups_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/NewTransitionRouteGroupsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/NewTransitionRouteGroupsClient/main.go deleted file mode 100644 index a9903153be7..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/NewTransitionRouteGroupsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewTransitionRouteGroupsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewTransitionRouteGroupsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewTransitionRouteGroupsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go index b7389bd32fa..f32b211220d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/TransitionRouteGroupsClient/UpdateTransitionRouteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_UpdateTransitionRouteGroup] +// [START dialogflow_v3beta1_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_TransitionRouteGroupsClient_UpdateTransitionRouteGroup] +// [END dialogflow_v3beta1_generated_TransitionRouteGroups_UpdateTransitionRouteGroup_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/CreateVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/CreateVersion/main.go index 6813e1d0937..95bcdd31b01 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/CreateVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/CreateVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_CreateVersion] +// [START dialogflow_v3beta1_generated_Versions_CreateVersion_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_CreateVersion] +// [END dialogflow_v3beta1_generated_Versions_CreateVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/DeleteVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/DeleteVersion/main.go index fea3737641e..8c8f3387b71 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/DeleteVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/DeleteVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_DeleteVersion] +// [START dialogflow_v3beta1_generated_Versions_DeleteVersion_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_DeleteVersion] +// [END dialogflow_v3beta1_generated_Versions_DeleteVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/GetVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/GetVersion/main.go index 60edadf689a..1d72dc29e60 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/GetVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/GetVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_GetVersion] +// [START dialogflow_v3beta1_generated_Versions_GetVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_GetVersion] +// [END dialogflow_v3beta1_generated_Versions_GetVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/ListVersions/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/ListVersions/main.go index 8c3f396e629..f5fe7735f5d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/ListVersions/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/ListVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_ListVersions] +// [START dialogflow_v3beta1_generated_Versions_ListVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_ListVersions] +// [END dialogflow_v3beta1_generated_Versions_ListVersions_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/LoadVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/LoadVersion/main.go index 53b77ffec4f..2be1cd6e68d 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/LoadVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/LoadVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_LoadVersion] +// [START dialogflow_v3beta1_generated_Versions_LoadVersion_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_LoadVersion] +// [END dialogflow_v3beta1_generated_Versions_LoadVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/NewVersionsClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/NewVersionsClient/main.go deleted file mode 100644 index 44d040cf20d..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/NewVersionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewVersionsClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewVersionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewVersionsClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/UpdateVersion/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/UpdateVersion/main.go index 699d7af8eee..9146e1ea2d8 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/UpdateVersion/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/VersionsClient/UpdateVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_UpdateVersion] +// [START dialogflow_v3beta1_generated_Versions_UpdateVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_VersionsClient_UpdateVersion] +// [END dialogflow_v3beta1_generated_Versions_UpdateVersion_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/CreateWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/CreateWebhook/main.go index 3dddf4ad29d..67822cd05c1 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/CreateWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/CreateWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_CreateWebhook] +// [START dialogflow_v3beta1_generated_Webhooks_CreateWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_CreateWebhook] +// [END dialogflow_v3beta1_generated_Webhooks_CreateWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/DeleteWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/DeleteWebhook/main.go index d546e3cf43e..f5ba4beda93 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/DeleteWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/DeleteWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_DeleteWebhook] +// [START dialogflow_v3beta1_generated_Webhooks_DeleteWebhook_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_DeleteWebhook] +// [END dialogflow_v3beta1_generated_Webhooks_DeleteWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/GetWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/GetWebhook/main.go index ecf5975c82e..646c1df4c0b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/GetWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/GetWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_GetWebhook] +// [START dialogflow_v3beta1_generated_Webhooks_GetWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_GetWebhook] +// [END dialogflow_v3beta1_generated_Webhooks_GetWebhook_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/ListWebhooks/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/ListWebhooks/main.go index adcede70452..ac4c18eda9b 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/ListWebhooks/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/ListWebhooks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_ListWebhooks] +// [START dialogflow_v3beta1_generated_Webhooks_ListWebhooks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_ListWebhooks] +// [END dialogflow_v3beta1_generated_Webhooks_ListWebhooks_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/NewWebhooksClient/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/NewWebhooksClient/main.go deleted file mode 100644 index 5a4db9182b9..00000000000 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/NewWebhooksClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_NewWebhooksClient] - -package main - -import ( - "context" - - cx "cloud.google.com/go/dialogflow/cx/apiv3beta1" -) - -func main() { - ctx := context.Background() - c, err := cx.NewWebhooksClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_NewWebhooksClient] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/UpdateWebhook/main.go b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/UpdateWebhook/main.go index de632b2c000..68524afa24a 100644 --- a/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/UpdateWebhook/main.go +++ b/internal/generated/snippets/dialogflow/cx/apiv3beta1/WebhooksClient/UpdateWebhook/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_UpdateWebhook] +// [START dialogflow_v3beta1_generated_Webhooks_UpdateWebhook_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dialogflow_generated_dialogflow_cx_apiv3beta1_WebhooksClient_UpdateWebhook] +// [END dialogflow_v3beta1_generated_Webhooks_UpdateWebhook_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ActivateJobTrigger/main.go b/internal/generated/snippets/dlp/apiv2/Client/ActivateJobTrigger/main.go index 93cc59c7a64..47b981d4dc6 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ActivateJobTrigger/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ActivateJobTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ActivateJobTrigger] +// [START dlp_v2_generated_DlpService_ActivateJobTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_ActivateJobTrigger] +// [END dlp_v2_generated_DlpService_ActivateJobTrigger_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/CancelDlpJob/main.go b/internal/generated/snippets/dlp/apiv2/Client/CancelDlpJob/main.go index 6127c9547bc..09bc36b7dd3 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/CancelDlpJob/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/CancelDlpJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_CancelDlpJob] +// [START dlp_v2_generated_DlpService_CancelDlpJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_CancelDlpJob] +// [END dlp_v2_generated_DlpService_CancelDlpJob_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/CreateDeidentifyTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/CreateDeidentifyTemplate/main.go index 62e7873a0ca..b48d024e935 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/CreateDeidentifyTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/CreateDeidentifyTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_CreateDeidentifyTemplate] +// [START dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_CreateDeidentifyTemplate] +// [END dlp_v2_generated_DlpService_CreateDeidentifyTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/CreateDlpJob/main.go b/internal/generated/snippets/dlp/apiv2/Client/CreateDlpJob/main.go index bfdd950ad27..adca6c725e9 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/CreateDlpJob/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/CreateDlpJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_CreateDlpJob] +// [START dlp_v2_generated_DlpService_CreateDlpJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_CreateDlpJob] +// [END dlp_v2_generated_DlpService_CreateDlpJob_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/CreateInspectTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/CreateInspectTemplate/main.go index 010761daf2b..7963b23b346 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/CreateInspectTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/CreateInspectTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_CreateInspectTemplate] +// [START dlp_v2_generated_DlpService_CreateInspectTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_CreateInspectTemplate] +// [END dlp_v2_generated_DlpService_CreateInspectTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/CreateJobTrigger/main.go b/internal/generated/snippets/dlp/apiv2/Client/CreateJobTrigger/main.go index 003eb710753..a1ca1ccafc8 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/CreateJobTrigger/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/CreateJobTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_CreateJobTrigger] +// [START dlp_v2_generated_DlpService_CreateJobTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_CreateJobTrigger] +// [END dlp_v2_generated_DlpService_CreateJobTrigger_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/CreateStoredInfoType/main.go b/internal/generated/snippets/dlp/apiv2/Client/CreateStoredInfoType/main.go index d7a8a19d9a2..cd7ed6f9621 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/CreateStoredInfoType/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/CreateStoredInfoType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_CreateStoredInfoType] +// [START dlp_v2_generated_DlpService_CreateStoredInfoType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_CreateStoredInfoType] +// [END dlp_v2_generated_DlpService_CreateStoredInfoType_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/DeidentifyContent/main.go b/internal/generated/snippets/dlp/apiv2/Client/DeidentifyContent/main.go index d5e3d8c2037..3767c4210c3 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/DeidentifyContent/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/DeidentifyContent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_DeidentifyContent] +// [START dlp_v2_generated_DlpService_DeidentifyContent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_DeidentifyContent] +// [END dlp_v2_generated_DlpService_DeidentifyContent_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/DeleteDeidentifyTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/DeleteDeidentifyTemplate/main.go index 09d588107af..f206a5c6d82 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/DeleteDeidentifyTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/DeleteDeidentifyTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_DeleteDeidentifyTemplate] +// [START dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_DeleteDeidentifyTemplate] +// [END dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/DeleteDlpJob/main.go b/internal/generated/snippets/dlp/apiv2/Client/DeleteDlpJob/main.go index 834d607b652..b7e6d3b7f73 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/DeleteDlpJob/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/DeleteDlpJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_DeleteDlpJob] +// [START dlp_v2_generated_DlpService_DeleteDlpJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_DeleteDlpJob] +// [END dlp_v2_generated_DlpService_DeleteDlpJob_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/DeleteInspectTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/DeleteInspectTemplate/main.go index 7025fb04e6b..baa508924ac 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/DeleteInspectTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/DeleteInspectTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_DeleteInspectTemplate] +// [START dlp_v2_generated_DlpService_DeleteInspectTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_DeleteInspectTemplate] +// [END dlp_v2_generated_DlpService_DeleteInspectTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/DeleteJobTrigger/main.go b/internal/generated/snippets/dlp/apiv2/Client/DeleteJobTrigger/main.go index 7374c63fc85..301eb0ebe2f 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/DeleteJobTrigger/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/DeleteJobTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_DeleteJobTrigger] +// [START dlp_v2_generated_DlpService_DeleteJobTrigger_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_DeleteJobTrigger] +// [END dlp_v2_generated_DlpService_DeleteJobTrigger_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/DeleteStoredInfoType/main.go b/internal/generated/snippets/dlp/apiv2/Client/DeleteStoredInfoType/main.go index 96aae14bd36..a86f13ef354 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/DeleteStoredInfoType/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/DeleteStoredInfoType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_DeleteStoredInfoType] +// [START dlp_v2_generated_DlpService_DeleteStoredInfoType_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_DeleteStoredInfoType] +// [END dlp_v2_generated_DlpService_DeleteStoredInfoType_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/FinishDlpJob/main.go b/internal/generated/snippets/dlp/apiv2/Client/FinishDlpJob/main.go index 48e2b9d3b37..3eccd6ff873 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/FinishDlpJob/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/FinishDlpJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_FinishDlpJob] +// [START dlp_v2_generated_DlpService_FinishDlpJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_FinishDlpJob] +// [END dlp_v2_generated_DlpService_FinishDlpJob_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/GetDeidentifyTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/GetDeidentifyTemplate/main.go index e5eba9bd18d..f1aab5123e5 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/GetDeidentifyTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/GetDeidentifyTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_GetDeidentifyTemplate] +// [START dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_GetDeidentifyTemplate] +// [END dlp_v2_generated_DlpService_GetDeidentifyTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/GetDlpJob/main.go b/internal/generated/snippets/dlp/apiv2/Client/GetDlpJob/main.go index 82ab2cd1a66..b6508452657 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/GetDlpJob/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/GetDlpJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_GetDlpJob] +// [START dlp_v2_generated_DlpService_GetDlpJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_GetDlpJob] +// [END dlp_v2_generated_DlpService_GetDlpJob_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/GetInspectTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/GetInspectTemplate/main.go index 6fac0f7a7e1..8712882fe1d 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/GetInspectTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/GetInspectTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_GetInspectTemplate] +// [START dlp_v2_generated_DlpService_GetInspectTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_GetInspectTemplate] +// [END dlp_v2_generated_DlpService_GetInspectTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/GetJobTrigger/main.go b/internal/generated/snippets/dlp/apiv2/Client/GetJobTrigger/main.go index bb5a0de8253..23436db7611 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/GetJobTrigger/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/GetJobTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_GetJobTrigger] +// [START dlp_v2_generated_DlpService_GetJobTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_GetJobTrigger] +// [END dlp_v2_generated_DlpService_GetJobTrigger_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/GetStoredInfoType/main.go b/internal/generated/snippets/dlp/apiv2/Client/GetStoredInfoType/main.go index c0d43a20204..fcfd07873bc 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/GetStoredInfoType/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/GetStoredInfoType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_GetStoredInfoType] +// [START dlp_v2_generated_DlpService_GetStoredInfoType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_GetStoredInfoType] +// [END dlp_v2_generated_DlpService_GetStoredInfoType_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/HybridInspectDlpJob/main.go b/internal/generated/snippets/dlp/apiv2/Client/HybridInspectDlpJob/main.go index dcc7ccbef59..9b1b78e5897 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/HybridInspectDlpJob/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/HybridInspectDlpJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_HybridInspectDlpJob] +// [START dlp_v2_generated_DlpService_HybridInspectDlpJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_HybridInspectDlpJob] +// [END dlp_v2_generated_DlpService_HybridInspectDlpJob_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/HybridInspectJobTrigger/main.go b/internal/generated/snippets/dlp/apiv2/Client/HybridInspectJobTrigger/main.go index 5d4696292b9..175b794e55e 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/HybridInspectJobTrigger/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/HybridInspectJobTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_HybridInspectJobTrigger] +// [START dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_HybridInspectJobTrigger] +// [END dlp_v2_generated_DlpService_HybridInspectJobTrigger_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/InspectContent/main.go b/internal/generated/snippets/dlp/apiv2/Client/InspectContent/main.go index 4b5ca1dac30..171a2187c48 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/InspectContent/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/InspectContent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_InspectContent] +// [START dlp_v2_generated_DlpService_InspectContent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_InspectContent] +// [END dlp_v2_generated_DlpService_InspectContent_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ListDeidentifyTemplates/main.go b/internal/generated/snippets/dlp/apiv2/Client/ListDeidentifyTemplates/main.go index e1defb74256..b56e394d124 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ListDeidentifyTemplates/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ListDeidentifyTemplates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ListDeidentifyTemplates] +// [START dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_ListDeidentifyTemplates] +// [END dlp_v2_generated_DlpService_ListDeidentifyTemplates_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ListDlpJobs/main.go b/internal/generated/snippets/dlp/apiv2/Client/ListDlpJobs/main.go index 53a075b1865..9b963c15711 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ListDlpJobs/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ListDlpJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ListDlpJobs] +// [START dlp_v2_generated_DlpService_ListDlpJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_ListDlpJobs] +// [END dlp_v2_generated_DlpService_ListDlpJobs_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ListInfoTypes/main.go b/internal/generated/snippets/dlp/apiv2/Client/ListInfoTypes/main.go index 282b43cdde2..1415f14f241 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ListInfoTypes/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ListInfoTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ListInfoTypes] +// [START dlp_v2_generated_DlpService_ListInfoTypes_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_ListInfoTypes] +// [END dlp_v2_generated_DlpService_ListInfoTypes_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ListInspectTemplates/main.go b/internal/generated/snippets/dlp/apiv2/Client/ListInspectTemplates/main.go index 8176cee3101..44b4ed07882 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ListInspectTemplates/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ListInspectTemplates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ListInspectTemplates] +// [START dlp_v2_generated_DlpService_ListInspectTemplates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_ListInspectTemplates] +// [END dlp_v2_generated_DlpService_ListInspectTemplates_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ListJobTriggers/main.go b/internal/generated/snippets/dlp/apiv2/Client/ListJobTriggers/main.go index 9b9e6299207..4fec0e01526 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ListJobTriggers/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ListJobTriggers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ListJobTriggers] +// [START dlp_v2_generated_DlpService_ListJobTriggers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_ListJobTriggers] +// [END dlp_v2_generated_DlpService_ListJobTriggers_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ListStoredInfoTypes/main.go b/internal/generated/snippets/dlp/apiv2/Client/ListStoredInfoTypes/main.go index a60a83f817c..6623f738671 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ListStoredInfoTypes/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ListStoredInfoTypes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ListStoredInfoTypes] +// [START dlp_v2_generated_DlpService_ListStoredInfoTypes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END dlp_generated_dlp_apiv2_Client_ListStoredInfoTypes] +// [END dlp_v2_generated_DlpService_ListStoredInfoTypes_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/NewClient/main.go b/internal/generated/snippets/dlp/apiv2/Client/NewClient/main.go deleted file mode 100644 index eebfa7ca5bf..00000000000 --- a/internal/generated/snippets/dlp/apiv2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START dlp_generated_dlp_apiv2_NewClient] - -package main - -import ( - "context" - - dlp "cloud.google.com/go/dlp/apiv2" -) - -func main() { - ctx := context.Background() - c, err := dlp.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END dlp_generated_dlp_apiv2_NewClient] diff --git a/internal/generated/snippets/dlp/apiv2/Client/RedactImage/main.go b/internal/generated/snippets/dlp/apiv2/Client/RedactImage/main.go index fe91d264247..6fb695ef67d 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/RedactImage/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/RedactImage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_RedactImage] +// [START dlp_v2_generated_DlpService_RedactImage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_RedactImage] +// [END dlp_v2_generated_DlpService_RedactImage_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/ReidentifyContent/main.go b/internal/generated/snippets/dlp/apiv2/Client/ReidentifyContent/main.go index a6b5a58539d..fe59b820052 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/ReidentifyContent/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/ReidentifyContent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_ReidentifyContent] +// [START dlp_v2_generated_DlpService_ReidentifyContent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_ReidentifyContent] +// [END dlp_v2_generated_DlpService_ReidentifyContent_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/UpdateDeidentifyTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/UpdateDeidentifyTemplate/main.go index 882c3418624..9ef9185a4b7 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/UpdateDeidentifyTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/UpdateDeidentifyTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_UpdateDeidentifyTemplate] +// [START dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_UpdateDeidentifyTemplate] +// [END dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/UpdateInspectTemplate/main.go b/internal/generated/snippets/dlp/apiv2/Client/UpdateInspectTemplate/main.go index 685d50a94c7..d95154b404a 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/UpdateInspectTemplate/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/UpdateInspectTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_UpdateInspectTemplate] +// [START dlp_v2_generated_DlpService_UpdateInspectTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_UpdateInspectTemplate] +// [END dlp_v2_generated_DlpService_UpdateInspectTemplate_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/UpdateJobTrigger/main.go b/internal/generated/snippets/dlp/apiv2/Client/UpdateJobTrigger/main.go index f034d1bde95..ab18c9e3896 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/UpdateJobTrigger/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/UpdateJobTrigger/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_UpdateJobTrigger] +// [START dlp_v2_generated_DlpService_UpdateJobTrigger_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_UpdateJobTrigger] +// [END dlp_v2_generated_DlpService_UpdateJobTrigger_sync] diff --git a/internal/generated/snippets/dlp/apiv2/Client/UpdateStoredInfoType/main.go b/internal/generated/snippets/dlp/apiv2/Client/UpdateStoredInfoType/main.go index c9f592bb299..5f273154f0c 100644 --- a/internal/generated/snippets/dlp/apiv2/Client/UpdateStoredInfoType/main.go +++ b/internal/generated/snippets/dlp/apiv2/Client/UpdateStoredInfoType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START dlp_generated_dlp_apiv2_Client_UpdateStoredInfoType] +// [START dlp_v2_generated_DlpService_UpdateStoredInfoType_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END dlp_generated_dlp_apiv2_Client_UpdateStoredInfoType] +// [END dlp_v2_generated_DlpService_UpdateStoredInfoType_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/BatchProcessDocuments/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/BatchProcessDocuments/main.go index 2c968627d3c..286dbae7e3d 100644 --- a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/BatchProcessDocuments/main.go +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/BatchProcessDocuments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START documentai_generated_documentai_apiv1_DocumentProcessorClient_BatchProcessDocuments] +// [START documentai_v1_generated_DocumentProcessorService_BatchProcessDocuments_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END documentai_generated_documentai_apiv1_DocumentProcessorClient_BatchProcessDocuments] +// [END documentai_v1_generated_DocumentProcessorService_BatchProcessDocuments_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/NewDocumentProcessorClient/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/NewDocumentProcessorClient/main.go deleted file mode 100644 index 0419e458dc0..00000000000 --- a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/NewDocumentProcessorClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START documentai_generated_documentai_apiv1_NewDocumentProcessorClient] - -package main - -import ( - "context" - - documentai "cloud.google.com/go/documentai/apiv1" -) - -func main() { - ctx := context.Background() - c, err := documentai.NewDocumentProcessorClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END documentai_generated_documentai_apiv1_NewDocumentProcessorClient] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ProcessDocument/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ProcessDocument/main.go index 71df23f0d0a..4babe59bc68 100644 --- a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ProcessDocument/main.go +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ProcessDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START documentai_generated_documentai_apiv1_DocumentProcessorClient_ProcessDocument] +// [START documentai_v1_generated_DocumentProcessorService_ProcessDocument_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END documentai_generated_documentai_apiv1_DocumentProcessorClient_ProcessDocument] +// [END documentai_v1_generated_DocumentProcessorService_ProcessDocument_sync] diff --git a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ReviewDocument/main.go b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ReviewDocument/main.go index ea830688294..5d57ddcaf70 100644 --- a/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ReviewDocument/main.go +++ b/internal/generated/snippets/documentai/apiv1/DocumentProcessorClient/ReviewDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START documentai_generated_documentai_apiv1_DocumentProcessorClient_ReviewDocument] +// [START documentai_v1_generated_DocumentProcessorService_ReviewDocument_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END documentai_generated_documentai_apiv1_DocumentProcessorClient_ReviewDocument] +// [END documentai_v1_generated_DocumentProcessorService_ReviewDocument_sync] diff --git a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/BatchProcessDocuments/main.go b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/BatchProcessDocuments/main.go index 3a527ecb186..a1fe9785226 100644 --- a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/BatchProcessDocuments/main.go +++ b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/BatchProcessDocuments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START documentai_generated_documentai_apiv1beta3_DocumentProcessorClient_BatchProcessDocuments] +// [START documentai_v1beta3_generated_DocumentProcessorService_BatchProcessDocuments_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END documentai_generated_documentai_apiv1beta3_DocumentProcessorClient_BatchProcessDocuments] +// [END documentai_v1beta3_generated_DocumentProcessorService_BatchProcessDocuments_sync] diff --git a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/NewDocumentProcessorClient/main.go b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/NewDocumentProcessorClient/main.go deleted file mode 100644 index 753fdb4f31f..00000000000 --- a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/NewDocumentProcessorClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START documentai_generated_documentai_apiv1beta3_NewDocumentProcessorClient] - -package main - -import ( - "context" - - documentai "cloud.google.com/go/documentai/apiv1beta3" -) - -func main() { - ctx := context.Background() - c, err := documentai.NewDocumentProcessorClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END documentai_generated_documentai_apiv1beta3_NewDocumentProcessorClient] diff --git a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ProcessDocument/main.go b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ProcessDocument/main.go index 2c97c4ecf37..b9b0ea4f9fe 100644 --- a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ProcessDocument/main.go +++ b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ProcessDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START documentai_generated_documentai_apiv1beta3_DocumentProcessorClient_ProcessDocument] +// [START documentai_v1beta3_generated_DocumentProcessorService_ProcessDocument_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END documentai_generated_documentai_apiv1beta3_DocumentProcessorClient_ProcessDocument] +// [END documentai_v1beta3_generated_DocumentProcessorService_ProcessDocument_sync] diff --git a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ReviewDocument/main.go b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ReviewDocument/main.go index 66e9f8b1824..0ddc864b2d3 100644 --- a/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ReviewDocument/main.go +++ b/internal/generated/snippets/documentai/apiv1beta3/DocumentProcessorClient/ReviewDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START documentai_generated_documentai_apiv1beta3_DocumentProcessorClient_ReviewDocument] +// [START documentai_v1beta3_generated_DocumentProcessorService_ReviewDocument_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END documentai_generated_documentai_apiv1beta3_DocumentProcessorClient_ReviewDocument] +// [END documentai_v1beta3_generated_DocumentProcessorService_ReviewDocument_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureContactSettings/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureContactSettings/main.go index c5b39e58f1a..4ac06ae4ea1 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureContactSettings/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureContactSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_ConfigureContactSettings] +// [START domains_v1beta1_generated_Domains_ConfigureContactSettings_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_ConfigureContactSettings] +// [END domains_v1beta1_generated_Domains_ConfigureContactSettings_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureDnsSettings/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureDnsSettings/main.go index 9ab87284c1c..4016e8040f8 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureDnsSettings/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureDnsSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_ConfigureDnsSettings] +// [START domains_v1beta1_generated_Domains_ConfigureDnsSettings_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_ConfigureDnsSettings] +// [END domains_v1beta1_generated_Domains_ConfigureDnsSettings_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureManagementSettings/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureManagementSettings/main.go index bd699cc978f..0eb523aea8c 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureManagementSettings/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/ConfigureManagementSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_ConfigureManagementSettings] +// [START domains_v1beta1_generated_Domains_ConfigureManagementSettings_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_ConfigureManagementSettings] +// [END domains_v1beta1_generated_Domains_ConfigureManagementSettings_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/DeleteRegistration/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/DeleteRegistration/main.go index 1baddc06080..080b4472369 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/DeleteRegistration/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/DeleteRegistration/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_DeleteRegistration] +// [START domains_v1beta1_generated_Domains_DeleteRegistration_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END domains_generated_domains_apiv1beta1_Client_DeleteRegistration] +// [END domains_v1beta1_generated_Domains_DeleteRegistration_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/ExportRegistration/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/ExportRegistration/main.go index 81fb263a8e4..89a7080dea2 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/ExportRegistration/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/ExportRegistration/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_ExportRegistration] +// [START domains_v1beta1_generated_Domains_ExportRegistration_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_ExportRegistration] +// [END domains_v1beta1_generated_Domains_ExportRegistration_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/GetRegistration/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/GetRegistration/main.go index 415aee5318e..bfbfe8e1304 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/GetRegistration/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/GetRegistration/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_GetRegistration] +// [START domains_v1beta1_generated_Domains_GetRegistration_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_GetRegistration] +// [END domains_v1beta1_generated_Domains_GetRegistration_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/ListRegistrations/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/ListRegistrations/main.go index cb39a23419b..913d586be86 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/ListRegistrations/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/ListRegistrations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_ListRegistrations] +// [START domains_v1beta1_generated_Domains_ListRegistrations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END domains_generated_domains_apiv1beta1_Client_ListRegistrations] +// [END domains_v1beta1_generated_Domains_ListRegistrations_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index d03492856dc..00000000000 --- a/internal/generated/snippets/domains/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START domains_generated_domains_apiv1beta1_NewClient] - -package main - -import ( - "context" - - domains "cloud.google.com/go/domains/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := domains.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END domains_generated_domains_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/RegisterDomain/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/RegisterDomain/main.go index 24e8f1c4af8..9d017102bc5 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/RegisterDomain/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/RegisterDomain/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_RegisterDomain] +// [START domains_v1beta1_generated_Domains_RegisterDomain_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_RegisterDomain] +// [END domains_v1beta1_generated_Domains_RegisterDomain_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/ResetAuthorizationCode/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/ResetAuthorizationCode/main.go index 3c3e35bf7a0..32ca0219cd9 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/ResetAuthorizationCode/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/ResetAuthorizationCode/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_ResetAuthorizationCode] +// [START domains_v1beta1_generated_Domains_ResetAuthorizationCode_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_ResetAuthorizationCode] +// [END domains_v1beta1_generated_Domains_ResetAuthorizationCode_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveAuthorizationCode/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveAuthorizationCode/main.go index 8371a4dd716..0f55f3f7ff8 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveAuthorizationCode/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveAuthorizationCode/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_RetrieveAuthorizationCode] +// [START domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_RetrieveAuthorizationCode] +// [END domains_v1beta1_generated_Domains_RetrieveAuthorizationCode_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveRegisterParameters/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveRegisterParameters/main.go index 0b2b2be83e1..f1a07ecf6b7 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveRegisterParameters/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/RetrieveRegisterParameters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_RetrieveRegisterParameters] +// [START domains_v1beta1_generated_Domains_RetrieveRegisterParameters_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_RetrieveRegisterParameters] +// [END domains_v1beta1_generated_Domains_RetrieveRegisterParameters_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/SearchDomains/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/SearchDomains/main.go index 737be3ba097..bfb8b676f4a 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/SearchDomains/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/SearchDomains/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_SearchDomains] +// [START domains_v1beta1_generated_Domains_SearchDomains_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_SearchDomains] +// [END domains_v1beta1_generated_Domains_SearchDomains_sync] diff --git a/internal/generated/snippets/domains/apiv1beta1/Client/UpdateRegistration/main.go b/internal/generated/snippets/domains/apiv1beta1/Client/UpdateRegistration/main.go index a85be47eb9d..1338c152fff 100644 --- a/internal/generated/snippets/domains/apiv1beta1/Client/UpdateRegistration/main.go +++ b/internal/generated/snippets/domains/apiv1beta1/Client/UpdateRegistration/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START domains_generated_domains_apiv1beta1_Client_UpdateRegistration] +// [START domains_v1beta1_generated_Domains_UpdateRegistration_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END domains_generated_domains_apiv1beta1_Client_UpdateRegistration] +// [END domains_v1beta1_generated_Domains_UpdateRegistration_sync] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/GetGroup/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/GetGroup/main.go index ac808da5eb6..9880f33f141 100644 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/GetGroup/main.go +++ b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/GetGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorGroupClient_GetGroup] +// [START clouderrorreporting_v1beta1_generated_ErrorGroupService_GetGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorGroupClient_GetGroup] +// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_GetGroup_sync] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/NewErrorGroupClient/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/NewErrorGroupClient/main.go deleted file mode 100644 index de3526675c1..00000000000 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/NewErrorGroupClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_NewErrorGroupClient] - -package main - -import ( - "context" - - errorreporting "cloud.google.com/go/errorreporting/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := errorreporting.NewErrorGroupClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_NewErrorGroupClient] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/UpdateGroup/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/UpdateGroup/main.go index 12535e455a3..99b99ab7fe1 100644 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/UpdateGroup/main.go +++ b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorGroupClient/UpdateGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorGroupClient_UpdateGroup] +// [START clouderrorreporting_v1beta1_generated_ErrorGroupService_UpdateGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorGroupClient_UpdateGroup] +// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_UpdateGroup_sync] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/DeleteEvents/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/DeleteEvents/main.go index 119de562a2e..175dc78da98 100644 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/DeleteEvents/main.go +++ b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/DeleteEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorStatsClient_DeleteEvents] +// [START clouderrorreporting_v1beta1_generated_ErrorStatsService_DeleteEvents_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorStatsClient_DeleteEvents] +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_DeleteEvents_sync] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListEvents/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListEvents/main.go index 7927ff1ed39..280c0017214 100644 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListEvents/main.go +++ b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorStatsClient_ListEvents] +// [START clouderrorreporting_v1beta1_generated_ErrorStatsService_ListEvents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorStatsClient_ListEvents] +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListEvents_sync] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListGroupStats/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListGroupStats/main.go index 09047e6a0d9..597d3e4dacb 100644 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListGroupStats/main.go +++ b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/ListGroupStats/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorStatsClient_ListGroupStats] +// [START clouderrorreporting_v1beta1_generated_ErrorStatsService_ListGroupStats_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_ErrorStatsClient_ListGroupStats] +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListGroupStats_sync] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/NewErrorStatsClient/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/NewErrorStatsClient/main.go deleted file mode 100644 index a55c35b788d..00000000000 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ErrorStatsClient/NewErrorStatsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_NewErrorStatsClient] - -package main - -import ( - "context" - - errorreporting "cloud.google.com/go/errorreporting/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := errorreporting.NewErrorStatsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_NewErrorStatsClient] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/NewReportErrorsClient/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/NewReportErrorsClient/main.go deleted file mode 100644 index ab6fa004405..00000000000 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/NewReportErrorsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_NewReportErrorsClient] - -package main - -import ( - "context" - - errorreporting "cloud.google.com/go/errorreporting/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := errorreporting.NewReportErrorsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_NewReportErrorsClient] diff --git a/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/ReportErrorEvent/main.go b/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/ReportErrorEvent/main.go index e91e208955b..4aa1a0f75fe 100644 --- a/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/ReportErrorEvent/main.go +++ b/internal/generated/snippets/errorreporting/apiv1beta1/ReportErrorsClient/ReportErrorEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START clouderrorreporting_generated_errorreporting_apiv1beta1_ReportErrorsClient_ReportErrorEvent] +// [START clouderrorreporting_v1beta1_generated_ReportErrorsService_ReportErrorEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END clouderrorreporting_generated_errorreporting_apiv1beta1_ReportErrorsClient_ReportErrorEvent] +// [END clouderrorreporting_v1beta1_generated_ReportErrorsService_ReportErrorEvent_sync] diff --git a/internal/generated/snippets/firestore/ArrayRemove/main.go b/internal/generated/snippets/firestore/ArrayRemove/main.go deleted file mode 100644 index a1c0e072b7b..00000000000 --- a/internal/generated/snippets/firestore/ArrayRemove/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_ArrayRemove_update] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - co := client.Doc("States/Colorado") - wr, err := co.Update(ctx, []firestore.Update{ - {Path: "cities", Value: firestore.ArrayRemove("Denver")}, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_ArrayRemove_update] diff --git a/internal/generated/snippets/firestore/ArrayUnion/create/main.go b/internal/generated/snippets/firestore/ArrayUnion/create/main.go deleted file mode 100644 index 9be1f56328f..00000000000 --- a/internal/generated/snippets/firestore/ArrayUnion/create/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_ArrayUnion_create] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - wr, err := client.Doc("States/Colorado").Create(ctx, map[string]interface{}{ - "cities": firestore.ArrayUnion("Denver", "Golden", "Boulder"), - "pop": 5.5, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_ArrayUnion_create] diff --git a/internal/generated/snippets/firestore/ArrayUnion/update/main.go b/internal/generated/snippets/firestore/ArrayUnion/update/main.go deleted file mode 100644 index a738e454a3c..00000000000 --- a/internal/generated/snippets/firestore/ArrayUnion/update/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_ArrayUnion_update] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - co := client.Doc("States/Colorado") - wr, err := co.Update(ctx, []firestore.Update{ - {Path: "cities", Value: firestore.ArrayUnion("Broomfield")}, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_ArrayUnion_update] diff --git a/internal/generated/snippets/firestore/Client/Batch/main.go b/internal/generated/snippets/firestore/Client/Batch/main.go deleted file mode 100644 index a77828cd93b..00000000000 --- a/internal/generated/snippets/firestore/Client/Batch/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Client_Batch] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - b := client.Batch() - _ = b // TODO: Use batch. -} - -// [END firestore_generated_firestore_Client_Batch] diff --git a/internal/generated/snippets/firestore/Client/Collection/main.go b/internal/generated/snippets/firestore/Client/Collection/main.go deleted file mode 100644 index 8ea6007f837..00000000000 --- a/internal/generated/snippets/firestore/Client/Collection/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Client_Collection] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - coll1 := client.Collection("States") - coll2 := client.Collection("States/NewYork/Cities") - fmt.Println(coll1, coll2) -} - -// [END firestore_generated_firestore_Client_Collection] diff --git a/internal/generated/snippets/firestore/Client/CollectionGroup/main.go b/internal/generated/snippets/firestore/Client/CollectionGroup/main.go deleted file mode 100644 index 34a408d393f..00000000000 --- a/internal/generated/snippets/firestore/Client/CollectionGroup/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Client_CollectionGroup] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - // Given: - // France/Cities/Paris = {population: 100} - // Canada/Cities/Montreal = {population: 95} - - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - // Query for ANY city with >95 pop, regardless of country. - docs, err := client.CollectionGroup("Cities"). - Where("pop", ">", 95). - OrderBy("pop", firestore.Desc). - Limit(10). - Documents(ctx). - GetAll() - if err != nil { - // TODO: Handle error. - } - - _ = docs // TODO: Use docs. -} - -// [END firestore_generated_firestore_Client_CollectionGroup] diff --git a/internal/generated/snippets/firestore/Client/Doc/main.go b/internal/generated/snippets/firestore/Client/Doc/main.go deleted file mode 100644 index c01f973bc5d..00000000000 --- a/internal/generated/snippets/firestore/Client/Doc/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Client_Doc] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - doc1 := client.Doc("States/NewYork") - doc2 := client.Doc("States/NewYork/Cities/Albany") - fmt.Println(doc1, doc2) -} - -// [END firestore_generated_firestore_Client_Doc] diff --git a/internal/generated/snippets/firestore/Client/GetAll/main.go b/internal/generated/snippets/firestore/Client/GetAll/main.go deleted file mode 100644 index bb211c459ce..00000000000 --- a/internal/generated/snippets/firestore/Client/GetAll/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Client_GetAll] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - docs, err := client.GetAll(ctx, []*firestore.DocumentRef{ - client.Doc("States/NorthCarolina"), - client.Doc("States/SouthCarolina"), - client.Doc("States/WestCarolina"), - client.Doc("States/EastCarolina"), - }) - if err != nil { - // TODO: Handle error. - } - // docs is a slice with four DocumentSnapshots, but the last two are - // nil because there is no West or East Carolina. - fmt.Println(docs) -} - -// [END firestore_generated_firestore_Client_GetAll] diff --git a/internal/generated/snippets/firestore/Client/NewClient/main.go b/internal/generated/snippets/firestore/Client/NewClient/main.go deleted file mode 100644 index 5b94dc08c58..00000000000 --- a/internal/generated/snippets/firestore/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() // Close client when done. - _ = client // TODO: Use client. -} - -// [END firestore_generated_firestore_NewClient] diff --git a/internal/generated/snippets/firestore/Client/RunTransaction/main.go b/internal/generated/snippets/firestore/Client/RunTransaction/main.go deleted file mode 100644 index b4586bb4e6b..00000000000 --- a/internal/generated/snippets/firestore/Client/RunTransaction/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Client_RunTransaction] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - nm := client.Doc("States/NewMexico") - err = client.RunTransaction(ctx, func(ctx context.Context, tx *firestore.Transaction) error { - doc, err := tx.Get(nm) // tx.Get, NOT nm.Get! - if err != nil { - return err - } - pop, err := doc.DataAt("pop") - if err != nil { - return err - } - return tx.Update(nm, []firestore.Update{{Path: "pop", Value: pop.(float64) + 0.2}}) - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END firestore_generated_firestore_Client_RunTransaction] diff --git a/internal/generated/snippets/firestore/CollectionRef/Add/main.go b/internal/generated/snippets/firestore/CollectionRef/Add/main.go deleted file mode 100644 index 0feabb01440..00000000000 --- a/internal/generated/snippets/firestore/CollectionRef/Add/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_CollectionRef_Add] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - doc, wr, err := client.Collection("Users").Add(ctx, map[string]interface{}{ - "name": "Alice", - "email": "aj@example.com", - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(doc, wr) -} - -// [END firestore_generated_firestore_CollectionRef_Add] diff --git a/internal/generated/snippets/firestore/CollectionRef/Doc/main.go b/internal/generated/snippets/firestore/CollectionRef/Doc/main.go deleted file mode 100644 index 866d8a72d7d..00000000000 --- a/internal/generated/snippets/firestore/CollectionRef/Doc/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_CollectionRef_Doc] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - fl := client.Collection("States").Doc("Florida") - ta := client.Collection("States").Doc("Florida/Cities/Tampa") - - fmt.Println(fl, ta) -} - -// [END firestore_generated_firestore_CollectionRef_Doc] diff --git a/internal/generated/snippets/firestore/CollectionRef/NewDoc/main.go b/internal/generated/snippets/firestore/CollectionRef/NewDoc/main.go deleted file mode 100644 index 406dbd0869e..00000000000 --- a/internal/generated/snippets/firestore/CollectionRef/NewDoc/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_CollectionRef_NewDoc] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - doc := client.Collection("Users").NewDoc() - - fmt.Println(doc) -} - -// [END firestore_generated_firestore_CollectionRef_NewDoc] diff --git a/internal/generated/snippets/firestore/DocumentIterator/GetAll/main.go b/internal/generated/snippets/firestore/DocumentIterator/GetAll/main.go deleted file mode 100644 index 59f39edf0a8..00000000000 --- a/internal/generated/snippets/firestore/DocumentIterator/GetAll/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentIterator_GetAll] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - q := client.Collection("States"). - Where("pop", ">", 10). - OrderBy("pop", firestore.Desc). - Limit(10) // a good idea with GetAll, to avoid filling memory - docs, err := q.Documents(ctx).GetAll() - if err != nil { - // TODO: Handle error. - } - for _, doc := range docs { - fmt.Println(doc.Data()) - } -} - -// [END firestore_generated_firestore_DocumentIterator_GetAll] diff --git a/internal/generated/snippets/firestore/DocumentIterator/Next/main.go b/internal/generated/snippets/firestore/DocumentIterator/Next/main.go deleted file mode 100644 index e319198013e..00000000000 --- a/internal/generated/snippets/firestore/DocumentIterator/Next/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - q := client.Collection("States"). - Where("pop", ">", 10). - OrderBy("pop", firestore.Desc) - iter := q.Documents(ctx) - defer iter.Stop() - for { - doc, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(doc.Data()) - } -} - -// [END firestore_generated_firestore_DocumentIterator_Next] diff --git a/internal/generated/snippets/firestore/DocumentRef/Collection/main.go b/internal/generated/snippets/firestore/DocumentRef/Collection/main.go deleted file mode 100644 index e1d5ab90e77..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Collection/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Collection] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - mi := client.Collection("States").Doc("Michigan") - cities := mi.Collection("Cities") - - fmt.Println(cities) -} - -// [END firestore_generated_firestore_DocumentRef_Collection] diff --git a/internal/generated/snippets/firestore/DocumentRef/Create/map/main.go b/internal/generated/snippets/firestore/DocumentRef/Create/map/main.go deleted file mode 100644 index 015e10f995b..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Create/map/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Create_map] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - wr, err := client.Doc("States/Colorado").Create(ctx, map[string]interface{}{ - "capital": "Denver", - "pop": 5.5, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_DocumentRef_Create_map] diff --git a/internal/generated/snippets/firestore/DocumentRef/Create/struct/main.go b/internal/generated/snippets/firestore/DocumentRef/Create/struct/main.go deleted file mode 100644 index 8e9703806e5..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Create/struct/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Create_struct] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - type State struct { - Capital string `firestore:"capital"` - Population float64 `firestore:"pop"` // in millions - } - - wr, err := client.Doc("States/Colorado").Create(ctx, State{ - Capital: "Denver", - Population: 5.5, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_DocumentRef_Create_struct] diff --git a/internal/generated/snippets/firestore/DocumentRef/Delete/main.go b/internal/generated/snippets/firestore/DocumentRef/Delete/main.go deleted file mode 100644 index 276273de270..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Delete/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - // Oops, Ontario is a Canadian province... - if _, err = client.Doc("States/Ontario").Delete(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END firestore_generated_firestore_DocumentRef_Delete] diff --git a/internal/generated/snippets/firestore/DocumentRef/Get/main.go b/internal/generated/snippets/firestore/DocumentRef/Get/main.go deleted file mode 100644 index 713ad743434..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Get/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Get] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - docsnap, err := client.Doc("States/Ohio").Get(ctx) - if err != nil { - // TODO: Handle error. - } - _ = docsnap // TODO: Use DocumentSnapshot. -} - -// [END firestore_generated_firestore_DocumentRef_Get] diff --git a/internal/generated/snippets/firestore/DocumentRef/Set/main.go b/internal/generated/snippets/firestore/DocumentRef/Set/main.go deleted file mode 100644 index 27fd5d0e34c..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Set/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Set] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - // Overwrite the document with the given data. Any other fields currently - // in the document will be removed. - wr, err := client.Doc("States/Alabama").Set(ctx, map[string]interface{}{ - "capital": "Montgomery", - "pop": 4.9, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_DocumentRef_Set] diff --git a/internal/generated/snippets/firestore/DocumentRef/Set/merge/main.go b/internal/generated/snippets/firestore/DocumentRef/Set/merge/main.go deleted file mode 100644 index 7a5a2edc33d..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Set/merge/main.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Set_merge] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - // Overwrite only the fields in the map; preserve all others. - _, err = client.Doc("States/Alabama").Set(ctx, map[string]interface{}{ - "pop": 5.2, - }, firestore.MergeAll) - if err != nil { - // TODO: Handle error. - } - - type State struct { - Capital string `firestore:"capital"` - Population float64 `firestore:"pop"` // in millions - } - - // To do a merging Set with struct data, specify the exact fields to overwrite. - // MergeAll is disallowed here, because it would probably be a mistake: the "capital" - // field would be overwritten with the empty string. - _, err = client.Doc("States/Alabama").Set(ctx, State{Population: 5.2}, firestore.Merge([]string{"pop"})) - if err != nil { - // TODO: Handle error. - } -} - -// [END firestore_generated_firestore_DocumentRef_Set_merge] diff --git a/internal/generated/snippets/firestore/DocumentRef/Snapshots/main.go b/internal/generated/snippets/firestore/DocumentRef/Snapshots/main.go deleted file mode 100644 index d62727f0da0..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Snapshots/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Snapshots] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - iter := client.Doc("States/Idaho").Snapshots(ctx) - defer iter.Stop() - for { - docsnap, err := iter.Next() - if err != nil { - // TODO: Handle error. - } - _ = docsnap // TODO: Use DocumentSnapshot. - } -} - -// [END firestore_generated_firestore_DocumentRef_Snapshots] diff --git a/internal/generated/snippets/firestore/DocumentRef/Update/main.go b/internal/generated/snippets/firestore/DocumentRef/Update/main.go deleted file mode 100644 index c653bfd185a..00000000000 --- a/internal/generated/snippets/firestore/DocumentRef/Update/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentRef_Update] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - tenn := client.Doc("States/Tennessee") - wr, err := tenn.Update(ctx, []firestore.Update{ - {Path: "pop", Value: 6.6}, - {FieldPath: []string{".", "*", "/"}, Value: "odd"}, - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_DocumentRef_Update] diff --git a/internal/generated/snippets/firestore/DocumentSnapshot/Data/main.go b/internal/generated/snippets/firestore/DocumentSnapshot/Data/main.go deleted file mode 100644 index e5b19af221b..00000000000 --- a/internal/generated/snippets/firestore/DocumentSnapshot/Data/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentSnapshot_Data] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - docsnap, err := client.Doc("States/Ohio").Get(ctx) - if err != nil { - // TODO: Handle error. - } - ohioMap := docsnap.Data() - fmt.Println(ohioMap["capital"]) -} - -// [END firestore_generated_firestore_DocumentSnapshot_Data] diff --git a/internal/generated/snippets/firestore/DocumentSnapshot/DataAt/main.go b/internal/generated/snippets/firestore/DocumentSnapshot/DataAt/main.go deleted file mode 100644 index 8b236a5e91c..00000000000 --- a/internal/generated/snippets/firestore/DocumentSnapshot/DataAt/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentSnapshot_DataAt] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - docsnap, err := client.Doc("States/Ohio").Get(ctx) - if err != nil { - // TODO: Handle error. - } - cap, err := docsnap.DataAt("capital") - if err != nil { - // TODO: Handle error. - } - fmt.Println(cap) -} - -// [END firestore_generated_firestore_DocumentSnapshot_DataAt] diff --git a/internal/generated/snippets/firestore/DocumentSnapshot/DataAtPath/main.go b/internal/generated/snippets/firestore/DocumentSnapshot/DataAtPath/main.go deleted file mode 100644 index 0ef2d4549d1..00000000000 --- a/internal/generated/snippets/firestore/DocumentSnapshot/DataAtPath/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentSnapshot_DataAtPath] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - docsnap, err := client.Doc("States/Ohio").Get(ctx) - if err != nil { - // TODO: Handle error. - } - pop, err := docsnap.DataAtPath([]string{"capital", "population"}) - if err != nil { - // TODO: Handle error. - } - fmt.Println(pop) -} - -// [END firestore_generated_firestore_DocumentSnapshot_DataAtPath] diff --git a/internal/generated/snippets/firestore/DocumentSnapshot/DataTo/main.go b/internal/generated/snippets/firestore/DocumentSnapshot/DataTo/main.go deleted file mode 100644 index 18918889161..00000000000 --- a/internal/generated/snippets/firestore/DocumentSnapshot/DataTo/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_DocumentSnapshot_DataTo] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - docsnap, err := client.Doc("States/Ohio").Get(ctx) - if err != nil { - // TODO: Handle error. - } - - type State struct { - Capital string `firestore:"capital"` - Population float64 `firestore:"pop"` // in millions - } - - var s State - if err := docsnap.DataTo(&s); err != nil { - // TODO: Handle error. - } - fmt.Println(s) -} - -// [END firestore_generated_firestore_DocumentSnapshot_DataTo] diff --git a/internal/generated/snippets/firestore/Increment/create/main.go b/internal/generated/snippets/firestore/Increment/create/main.go deleted file mode 100644 index e2a831bff76..00000000000 --- a/internal/generated/snippets/firestore/Increment/create/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Increment_create] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - wr, err := client.Doc("States/Colorado").Create(ctx, map[string]interface{}{ - "cities": []string{"Denver", "Golden", "Boulder"}, - "pop": firestore.Increment(7), // "pop" will be set to 7. - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_Increment_create] diff --git a/internal/generated/snippets/firestore/Increment/update/main.go b/internal/generated/snippets/firestore/Increment/update/main.go deleted file mode 100644 index f59bf507806..00000000000 --- a/internal/generated/snippets/firestore/Increment/update/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Increment_update] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - co := client.Doc("States/Colorado") - wr, err := co.Update(ctx, []firestore.Update{ - {Path: "pop", Value: firestore.Increment(7)}, // "pop" will incremented by 7. - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(wr.UpdateTime) -} - -// [END firestore_generated_firestore_Increment_update] diff --git a/internal/generated/snippets/firestore/Query/Documents/main.go b/internal/generated/snippets/firestore/Query/Documents/main.go deleted file mode 100644 index 0d6369b6744..00000000000 --- a/internal/generated/snippets/firestore/Query/Documents/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Query_Documents] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - q := client.Collection("States").Select("pop"). - Where("pop", ">", 10). - OrderBy("pop", firestore.Desc). - Limit(10) - iter1 := q.Documents(ctx) - _ = iter1 // TODO: Use iter1. - - // You can call Documents directly on a CollectionRef as well. - iter2 := client.Collection("States").Documents(ctx) - _ = iter2 // TODO: Use iter2. -} - -// [END firestore_generated_firestore_Query_Documents] diff --git a/internal/generated/snippets/firestore/Query/Documents/path_methods/main.go b/internal/generated/snippets/firestore/Query/Documents/path_methods/main.go deleted file mode 100644 index d3997e0eceb..00000000000 --- a/internal/generated/snippets/firestore/Query/Documents/path_methods/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Query_Documents_path_methods] - -package main - -import ( - "context" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - q := client.Collection("Unusual").SelectPaths([]string{"*"}, []string{"[~]"}). - WherePath([]string{"/"}, ">", 10). - OrderByPath([]string{"/"}, firestore.Desc). - Limit(10) - iter1 := q.Documents(ctx) - _ = iter1 // TODO: Use iter1. - - // You can call Documents directly on a CollectionRef as well. - iter2 := client.Collection("States").Documents(ctx) - _ = iter2 // TODO: Use iter2. -} - -// [END firestore_generated_firestore_Query_Documents_path_methods] diff --git a/internal/generated/snippets/firestore/Query/Snapshots/main.go b/internal/generated/snippets/firestore/Query/Snapshots/main.go deleted file mode 100644 index 460931aa9f0..00000000000 --- a/internal/generated/snippets/firestore/Query/Snapshots/main.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_Query_Snapshots] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - q := client.Collection("States"). - Where("pop", ">", 10). - OrderBy("pop", firestore.Desc). - Limit(10) - qsnapIter := q.Snapshots(ctx) - // Listen forever for changes to the query's results. - for { - qsnap, err := qsnapIter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Printf("At %s there were %d results.\n", qsnap.ReadTime, qsnap.Size) - _ = qsnap.Documents // TODO: Iterate over the results if desired. - _ = qsnap.Changes // TODO: Use the list of incremental changes if desired. - } -} - -// [END firestore_generated_firestore_Query_Snapshots] diff --git a/internal/generated/snippets/firestore/WriteBatch/Commit/main.go b/internal/generated/snippets/firestore/WriteBatch/Commit/main.go deleted file mode 100644 index a1aee796582..00000000000 --- a/internal/generated/snippets/firestore/WriteBatch/Commit/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_WriteBatch_Commit] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/firestore" -) - -func main() { - ctx := context.Background() - client, err := firestore.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - type State struct { - Capital string `firestore:"capital"` - Population float64 `firestore:"pop"` // in millions - } - - ny := client.Doc("States/NewYork") - ca := client.Doc("States/California") - - writeResults, err := client.Batch(). - Create(ny, State{Capital: "Albany", Population: 19.8}). - Set(ca, State{Capital: "Sacramento", Population: 39.14}). - Delete(client.Doc("States/WestDakota")). - Commit(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Println(writeResults) -} - -// [END firestore_generated_firestore_WriteBatch_Commit] diff --git a/internal/generated/snippets/firestore/apiv1/Client/BatchWrite/main.go b/internal/generated/snippets/firestore/apiv1/Client/BatchWrite/main.go index adb9ee6201a..c280f4e2f31 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/BatchWrite/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/BatchWrite/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_BatchWrite] +// [START firestore_v1_generated_Firestore_BatchWrite_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_Client_BatchWrite] +// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/BeginTransaction/main.go b/internal/generated/snippets/firestore/apiv1/Client/BeginTransaction/main.go index 0c8d06ad8e5..45d4470636f 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/BeginTransaction/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/BeginTransaction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_BeginTransaction] +// [START firestore_v1_generated_Firestore_BeginTransaction_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_Client_BeginTransaction] +// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/Commit/main.go b/internal/generated/snippets/firestore/apiv1/Client/Commit/main.go index 68682019505..e568839696f 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/Commit/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/Commit/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_Commit] +// [START firestore_v1_generated_Firestore_Commit_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_Client_Commit] +// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/CreateDocument/main.go b/internal/generated/snippets/firestore/apiv1/Client/CreateDocument/main.go index cac28237ebd..f9d8d9f8a7d 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/CreateDocument/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/CreateDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_CreateDocument] +// [START firestore_v1_generated_Firestore_CreateDocument_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_Client_CreateDocument] +// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/DeleteDocument/main.go b/internal/generated/snippets/firestore/apiv1/Client/DeleteDocument/main.go index 355d501318a..b34dd650a48 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/DeleteDocument/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/DeleteDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_DeleteDocument] +// [START firestore_v1_generated_Firestore_DeleteDocument_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_DeleteDocument] +// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/GetDocument/main.go b/internal/generated/snippets/firestore/apiv1/Client/GetDocument/main.go index 09843546574..745692457a2 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/GetDocument/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/GetDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_GetDocument] +// [START firestore_v1_generated_Firestore_GetDocument_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_Client_GetDocument] +// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/ListCollectionIds/main.go b/internal/generated/snippets/firestore/apiv1/Client/ListCollectionIds/main.go index 5f1624dc790..df9944d6ab3 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/ListCollectionIds/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/ListCollectionIds/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_ListCollectionIds] +// [START firestore_v1_generated_Firestore_ListCollectionIds_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_ListCollectionIds] +// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/ListDocuments/main.go b/internal/generated/snippets/firestore/apiv1/Client/ListDocuments/main.go index 3d8f7aa2e66..cfb54c69d29 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/ListDocuments/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/ListDocuments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_ListDocuments] +// [START firestore_v1_generated_Firestore_ListDocuments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_ListDocuments] +// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/Listen/main.go b/internal/generated/snippets/firestore/apiv1/Client/Listen/main.go index 42dab61c83f..e8de12e9da0 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/Listen/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/Listen/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_Listen] +// [START firestore_v1_generated_Firestore_Listen_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_Listen] +// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/NewClient/main.go b/internal/generated/snippets/firestore/apiv1/Client/NewClient/main.go deleted file mode 100644 index 2ac5142c10c..00000000000 --- a/internal/generated/snippets/firestore/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1_NewClient] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1" -) - -func main() { - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END firestore_generated_firestore_apiv1_NewClient] diff --git a/internal/generated/snippets/firestore/apiv1/Client/PartitionQuery/main.go b/internal/generated/snippets/firestore/apiv1/Client/PartitionQuery/main.go index 70366b258c1..0a43c136f5f 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/PartitionQuery/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/PartitionQuery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_PartitionQuery] +// [START firestore_v1_generated_Firestore_PartitionQuery_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_PartitionQuery] +// [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/Rollback/main.go b/internal/generated/snippets/firestore/apiv1/Client/Rollback/main.go index 2007a3b97df..555b0831ec7 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/Rollback/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/Rollback/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_Rollback] +// [START firestore_v1_generated_Firestore_Rollback_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_Rollback] +// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/UpdateDocument/main.go b/internal/generated/snippets/firestore/apiv1/Client/UpdateDocument/main.go index fd20ecf6fe2..ee475ba2cb6 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/UpdateDocument/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/UpdateDocument/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_UpdateDocument] +// [START firestore_v1_generated_Firestore_UpdateDocument_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_Client_UpdateDocument] +// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/internal/generated/snippets/firestore/apiv1/Client/Write/main.go b/internal/generated/snippets/firestore/apiv1/Client/Write/main.go index 6a8f0cf495d..6309aef2c4b 100644 --- a/internal/generated/snippets/firestore/apiv1/Client/Write/main.go +++ b/internal/generated/snippets/firestore/apiv1/Client/Write/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_Client_Write] +// [START firestore_v1_generated_Firestore_Write_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_Client_Write] +// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/CreateIndex/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/CreateIndex/main.go index 75449ed18d3..6ce928e0d11 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/CreateIndex/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/CreateIndex/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_CreateIndex] +// [START firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_CreateIndex] +// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/DeleteIndex/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/DeleteIndex/main.go index 150d4304d36..5ffc5e24999 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/DeleteIndex/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/DeleteIndex/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_DeleteIndex] +// [START firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_DeleteIndex] +// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ExportDocuments/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ExportDocuments/main.go index 69e7f2969b2..e237725fd4b 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ExportDocuments/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ExportDocuments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ExportDocuments] +// [START firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ExportDocuments] +// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetField/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetField/main.go index f366b7f3ce9..c8478cdea63 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetField/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_GetField] +// [START firestore_v1_generated_FirestoreAdmin_GetField_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_GetField] +// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetIndex/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetIndex/main.go index 1770c8f2cbd..9f32dadbad9 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetIndex/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/GetIndex/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_GetIndex] +// [START firestore_v1_generated_FirestoreAdmin_GetIndex_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_GetIndex] +// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ImportDocuments/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ImportDocuments/main.go index 5618f454775..2996b699a73 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ImportDocuments/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ImportDocuments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ImportDocuments] +// [START firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ImportDocuments] +// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListFields/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListFields/main.go index dc54c6452d5..eb6abeb6f2a 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListFields/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListFields/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ListFields] +// [START firestore_v1_generated_FirestoreAdmin_ListFields_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ListFields] +// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListIndexes/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListIndexes/main.go index 2e55867d25b..bf199d231be 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListIndexes/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/ListIndexes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ListIndexes] +// [START firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_ListIndexes] +// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/NewFirestoreAdminClient/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/NewFirestoreAdminClient/main.go deleted file mode 100644 index 2ddc99bd0d7..00000000000 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/NewFirestoreAdminClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1_admin_NewFirestoreAdminClient] - -package main - -import ( - "context" - - apiv1 "cloud.google.com/go/firestore/apiv1/admin" -) - -func main() { - ctx := context.Background() - c, err := apiv1.NewFirestoreAdminClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END firestore_generated_firestore_apiv1_admin_NewFirestoreAdminClient] diff --git a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/UpdateField/main.go b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/UpdateField/main.go index 42e10fe997e..e3d3a126da2 100644 --- a/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/UpdateField/main.go +++ b/internal/generated/snippets/firestore/apiv1/admin/FirestoreAdminClient/UpdateField/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_UpdateField] +// [START firestore_v1_generated_FirestoreAdmin_UpdateField_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END firestore_generated_firestore_apiv1_admin_FirestoreAdminClient_UpdateField] +// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/BeginTransaction/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/BeginTransaction/main.go deleted file mode 100644 index f84c10d3bff..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/BeginTransaction/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_BeginTransaction] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.BeginTransactionRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.BeginTransaction(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END firestore_generated_firestore_apiv1beta1_Client_BeginTransaction] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/Commit/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/Commit/main.go deleted file mode 100644 index 2baa369d8b3..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/Commit/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_Commit] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.CommitRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.Commit(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END firestore_generated_firestore_apiv1beta1_Client_Commit] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/CreateDocument/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/CreateDocument/main.go deleted file mode 100644 index 252d7d12df6..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/CreateDocument/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_CreateDocument] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.CreateDocumentRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.CreateDocument(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END firestore_generated_firestore_apiv1beta1_Client_CreateDocument] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/DeleteDocument/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/DeleteDocument/main.go deleted file mode 100644 index 046691811f0..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/DeleteDocument/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_DeleteDocument] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.DeleteDocumentRequest{ - // TODO: Fill request struct fields. - } - err = c.DeleteDocument(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END firestore_generated_firestore_apiv1beta1_Client_DeleteDocument] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/GetDocument/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/GetDocument/main.go deleted file mode 100644 index 3dbb2b6f00e..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/GetDocument/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_GetDocument] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.GetDocumentRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetDocument(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END firestore_generated_firestore_apiv1beta1_Client_GetDocument] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/ListCollectionIds/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/ListCollectionIds/main.go deleted file mode 100644 index 075c860b23c..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/ListCollectionIds/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_ListCollectionIds] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - "google.golang.org/api/iterator" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - // import "google.golang.org/api/iterator" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.ListCollectionIdsRequest{ - // TODO: Fill request struct fields. - } - it := c.ListCollectionIds(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END firestore_generated_firestore_apiv1beta1_Client_ListCollectionIds] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/ListDocuments/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/ListDocuments/main.go deleted file mode 100644 index 60489b71d0a..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/ListDocuments/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_ListDocuments] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - "google.golang.org/api/iterator" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - // import "google.golang.org/api/iterator" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.ListDocumentsRequest{ - // TODO: Fill request struct fields. - } - it := c.ListDocuments(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END firestore_generated_firestore_apiv1beta1_Client_ListDocuments] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/Listen/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/Listen/main.go deleted file mode 100644 index 37e283312f1..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/Listen/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_Listen] - -package main - -import ( - "context" - "io" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - stream, err := c.Listen(ctx) - if err != nil { - // TODO: Handle error. - } - go func() { - reqs := []*firestorepb.ListenRequest{ - // TODO: Create requests. - } - for _, req := range reqs { - if err := stream.Send(req); err != nil { - // TODO: Handle error. - } - } - stream.CloseSend() - }() - for { - resp, err := stream.Recv() - if err == io.EOF { - break - } - if err != nil { - // TODO: handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END firestore_generated_firestore_apiv1beta1_Client_Listen] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 1e843aaaefc..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_NewClient] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END firestore_generated_firestore_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/Rollback/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/Rollback/main.go deleted file mode 100644 index e529d98d051..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/Rollback/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_Rollback] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.RollbackRequest{ - // TODO: Fill request struct fields. - } - err = c.Rollback(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END firestore_generated_firestore_apiv1beta1_Client_Rollback] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/UpdateDocument/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/UpdateDocument/main.go deleted file mode 100644 index 3ef660a891e..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/UpdateDocument/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_UpdateDocument] - -package main - -import ( - "context" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &firestorepb.UpdateDocumentRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.UpdateDocument(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END firestore_generated_firestore_apiv1beta1_Client_UpdateDocument] diff --git a/internal/generated/snippets/firestore/apiv1beta1/Client/Write/main.go b/internal/generated/snippets/firestore/apiv1beta1/Client/Write/main.go deleted file mode 100644 index d5ae52912da..00000000000 --- a/internal/generated/snippets/firestore/apiv1beta1/Client/Write/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START firestore_generated_firestore_apiv1beta1_Client_Write] - -package main - -import ( - "context" - "io" - - firestore "cloud.google.com/go/firestore/apiv1beta1" - firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" -) - -func main() { - // import firestorepb "google.golang.org/genproto/googleapis/firestore/v1beta1" - - ctx := context.Background() - c, err := firestore.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - stream, err := c.Write(ctx) - if err != nil { - // TODO: Handle error. - } - go func() { - reqs := []*firestorepb.WriteRequest{ - // TODO: Create requests. - } - for _, req := range reqs { - if err := stream.Send(req); err != nil { - // TODO: Handle error. - } - } - stream.CloseSend() - }() - for { - resp, err := stream.Recv() - if err == io.EOF { - break - } - if err != nil { - // TODO: handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END firestore_generated_firestore_apiv1beta1_Client_Write] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CallFunction/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CallFunction/main.go index 0e57bf51b85..214c32441ad 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CallFunction/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CallFunction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_CallFunction] +// [START cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_CallFunction] +// [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CreateFunction/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CreateFunction/main.go index 84805ec1a2f..a1625e728ce 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CreateFunction/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/CreateFunction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_CreateFunction] +// [START cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_CreateFunction] +// [END cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/DeleteFunction/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/DeleteFunction/main.go index 84568642a67..1a267f2b64f 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/DeleteFunction/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/DeleteFunction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_DeleteFunction] +// [START cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_DeleteFunction] +// [END cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateDownloadUrl/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateDownloadUrl/main.go index 1f40ee1ced9..2fb7112f589 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateDownloadUrl/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateDownloadUrl/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GenerateDownloadUrl] +// [START cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GenerateDownloadUrl] +// [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateUploadUrl/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateUploadUrl/main.go index 468c0e46b1b..883a3381295 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateUploadUrl/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GenerateUploadUrl/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GenerateUploadUrl] +// [START cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GenerateUploadUrl] +// [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetFunction/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetFunction/main.go index 1da7962cdb6..faff4407636 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetFunction/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetFunction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GetFunction] +// [START cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GetFunction] +// [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetIamPolicy/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetIamPolicy/main.go index 858c67bf362..33a58c111eb 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GetIamPolicy] +// [START cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_GetIamPolicy] +// [END cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/ListFunctions/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/ListFunctions/main.go index abe389546e9..da595d0ebdb 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/ListFunctions/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/ListFunctions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_ListFunctions] +// [START cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_ListFunctions] +// [END cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/NewCloudFunctionsClient/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/NewCloudFunctionsClient/main.go deleted file mode 100644 index d7afcf26953..00000000000 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/NewCloudFunctionsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudfunctions_generated_functions_apiv1_NewCloudFunctionsClient] - -package main - -import ( - "context" - - functions "cloud.google.com/go/functions/apiv1" -) - -func main() { - ctx := context.Background() - c, err := functions.NewCloudFunctionsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudfunctions_generated_functions_apiv1_NewCloudFunctionsClient] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/SetIamPolicy/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/SetIamPolicy/main.go index 1ebbae05344..8f5b34fe584 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_SetIamPolicy] +// [START cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_SetIamPolicy] +// [END cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/TestIamPermissions/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/TestIamPermissions/main.go index 64cc14c9acd..804243f4cfd 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_TestIamPermissions] +// [START cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_TestIamPermissions] +// [END cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/UpdateFunction/main.go b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/UpdateFunction/main.go index dba2cf24332..4e123495175 100644 --- a/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/UpdateFunction/main.go +++ b/internal/generated/snippets/functions/apiv1/CloudFunctionsClient/UpdateFunction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_UpdateFunction] +// [START cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudfunctions_generated_functions_apiv1_CloudFunctionsClient_UpdateFunction] +// [END cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/CreateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/CreateGameServerCluster/main.go index 5bc541aa3ff..50b1ca2fd43 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/CreateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/CreateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_CreateGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_CreateGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_CreateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/DeleteGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/DeleteGameServerCluster/main.go index 08aa4f25132..0c7369c88f8 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/DeleteGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/DeleteGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_DeleteGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_DeleteGameServerCluster_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_DeleteGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_DeleteGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/GetGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/GetGameServerCluster/main.go index 0a72cf4e08a..ee63d0c85ad 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/GetGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/GetGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_GetGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_GetGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_GetGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_GetGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/ListGameServerClusters/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/ListGameServerClusters/main.go index e4c4731669d..e8c523735ff 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/ListGameServerClusters/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/ListGameServerClusters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_ListGameServerClusters] +// [START gameservices_v1_generated_GameServerClustersService_ListGameServerClusters_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_ListGameServerClusters] +// [END gameservices_v1_generated_GameServerClustersService_ListGameServerClusters_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/NewGameServerClustersClient/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/NewGameServerClustersClient/main.go deleted file mode 100644 index ea8f1de651b..00000000000 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/NewGameServerClustersClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1_NewGameServerClustersClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewGameServerClustersClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1_NewGameServerClustersClient] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewCreateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewCreateGameServerCluster/main.go index ef1cbb3a510..5e874d91875 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewCreateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewCreateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_PreviewCreateGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_PreviewCreateGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_PreviewCreateGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_PreviewCreateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go index a3238da761e..9773889bf2f 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_PreviewDeleteGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_PreviewDeleteGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_PreviewDeleteGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_PreviewDeleteGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go index 4a5196b49bb..e647e13cb9f 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_PreviewUpdateGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_PreviewUpdateGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_PreviewUpdateGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_PreviewUpdateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/UpdateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/UpdateGameServerCluster/main.go index 7bcfb41452b..f3b5510a23b 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/UpdateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerClustersClient/UpdateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerClustersClient_UpdateGameServerCluster] +// [START gameservices_v1_generated_GameServerClustersService_UpdateGameServerCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerClustersClient_UpdateGameServerCluster] +// [END gameservices_v1_generated_GameServerClustersService_UpdateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/CreateGameServerConfig/main.go b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/CreateGameServerConfig/main.go index 59217f25ab6..bebe234fd8a 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/CreateGameServerConfig/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/CreateGameServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerConfigsClient_CreateGameServerConfig] +// [START gameservices_v1_generated_GameServerConfigsService_CreateGameServerConfig_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerConfigsClient_CreateGameServerConfig] +// [END gameservices_v1_generated_GameServerConfigsService_CreateGameServerConfig_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/DeleteGameServerConfig/main.go b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/DeleteGameServerConfig/main.go index cee6395924d..c0ea13c9312 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/DeleteGameServerConfig/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/DeleteGameServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerConfigsClient_DeleteGameServerConfig] +// [START gameservices_v1_generated_GameServerConfigsService_DeleteGameServerConfig_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_GameServerConfigsClient_DeleteGameServerConfig] +// [END gameservices_v1_generated_GameServerConfigsService_DeleteGameServerConfig_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/GetGameServerConfig/main.go b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/GetGameServerConfig/main.go index c450526f16a..b0f152dc806 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/GetGameServerConfig/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/GetGameServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerConfigsClient_GetGameServerConfig] +// [START gameservices_v1_generated_GameServerConfigsService_GetGameServerConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerConfigsClient_GetGameServerConfig] +// [END gameservices_v1_generated_GameServerConfigsService_GetGameServerConfig_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/ListGameServerConfigs/main.go b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/ListGameServerConfigs/main.go index ab0ae676442..f7deca744b9 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/ListGameServerConfigs/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/ListGameServerConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerConfigsClient_ListGameServerConfigs] +// [START gameservices_v1_generated_GameServerConfigsService_ListGameServerConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_GameServerConfigsClient_ListGameServerConfigs] +// [END gameservices_v1_generated_GameServerConfigsService_ListGameServerConfigs_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/NewGameServerConfigsClient/main.go b/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/NewGameServerConfigsClient/main.go deleted file mode 100644 index 416fe897685..00000000000 --- a/internal/generated/snippets/gaming/apiv1/GameServerConfigsClient/NewGameServerConfigsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1_NewGameServerConfigsClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewGameServerConfigsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1_NewGameServerConfigsClient] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/CreateGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/CreateGameServerDeployment/main.go index 4a2bbb444f1..1e775856e94 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/CreateGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/CreateGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_CreateGameServerDeployment] +// [START gameservices_v1_generated_GameServerDeploymentsService_CreateGameServerDeployment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_CreateGameServerDeployment] +// [END gameservices_v1_generated_GameServerDeploymentsService_CreateGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go index 45eb5c9bc40..edac09c4f20 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_DeleteGameServerDeployment] +// [START gameservices_v1_generated_GameServerDeploymentsService_DeleteGameServerDeployment_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_DeleteGameServerDeployment] +// [END gameservices_v1_generated_GameServerDeploymentsService_DeleteGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/FetchDeploymentState/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/FetchDeploymentState/main.go index bc6e678ae33..c4be70111b4 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/FetchDeploymentState/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/FetchDeploymentState/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_FetchDeploymentState] +// [START gameservices_v1_generated_GameServerDeploymentsService_FetchDeploymentState_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_FetchDeploymentState] +// [END gameservices_v1_generated_GameServerDeploymentsService_FetchDeploymentState_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeployment/main.go index 7a61b4d370c..445a9545185 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_GetGameServerDeployment] +// [START gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeployment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_GetGameServerDeployment] +// [END gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go index d403e718a87..9817efdfef0 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_GetGameServerDeploymentRollout] +// [START gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeploymentRollout_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_GetGameServerDeploymentRollout] +// [END gameservices_v1_generated_GameServerDeploymentsService_GetGameServerDeploymentRollout_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/ListGameServerDeployments/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/ListGameServerDeployments/main.go index f734d769b2b..466b6c1bb67 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/ListGameServerDeployments/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/ListGameServerDeployments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_ListGameServerDeployments] +// [START gameservices_v1_generated_GameServerDeploymentsService_ListGameServerDeployments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_ListGameServerDeployments] +// [END gameservices_v1_generated_GameServerDeploymentsService_ListGameServerDeployments_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/NewGameServerDeploymentsClient/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/NewGameServerDeploymentsClient/main.go deleted file mode 100644 index 027b2bfa35f..00000000000 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/NewGameServerDeploymentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1_NewGameServerDeploymentsClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewGameServerDeploymentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1_NewGameServerDeploymentsClient] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go index a008a2d629a..6d1d400516b 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_PreviewGameServerDeploymentRollout] +// [START gameservices_v1_generated_GameServerDeploymentsService_PreviewGameServerDeploymentRollout_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_PreviewGameServerDeploymentRollout] +// [END gameservices_v1_generated_GameServerDeploymentsService_PreviewGameServerDeploymentRollout_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go index 7038cd12a65..6926003720f 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_UpdateGameServerDeployment] +// [START gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeployment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_UpdateGameServerDeployment] +// [END gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go index 57345670aa8..38241865f02 100644 --- a/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go +++ b/internal/generated/snippets/gaming/apiv1/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_UpdateGameServerDeploymentRollout] +// [START gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeploymentRollout_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_GameServerDeploymentsClient_UpdateGameServerDeploymentRollout] +// [END gameservices_v1_generated_GameServerDeploymentsService_UpdateGameServerDeploymentRollout_sync] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/CreateRealm/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/CreateRealm/main.go index 7566ed0477f..529a35e7540 100644 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/CreateRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1/RealmsClient/CreateRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_RealmsClient_CreateRealm] +// [START gameservices_v1_generated_RealmsService_CreateRealm_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_RealmsClient_CreateRealm] +// [END gameservices_v1_generated_RealmsService_CreateRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/DeleteRealm/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/DeleteRealm/main.go index 1f62c6929bb..712f8668fd7 100644 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/DeleteRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1/RealmsClient/DeleteRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_RealmsClient_DeleteRealm] +// [START gameservices_v1_generated_RealmsService_DeleteRealm_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_RealmsClient_DeleteRealm] +// [END gameservices_v1_generated_RealmsService_DeleteRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/GetRealm/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/GetRealm/main.go index df496746a1f..11e1793209a 100644 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/GetRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1/RealmsClient/GetRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_RealmsClient_GetRealm] +// [START gameservices_v1_generated_RealmsService_GetRealm_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_RealmsClient_GetRealm] +// [END gameservices_v1_generated_RealmsService_GetRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/ListRealms/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/ListRealms/main.go index 2d3a4a479d2..5a4e46d8064 100644 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/ListRealms/main.go +++ b/internal/generated/snippets/gaming/apiv1/RealmsClient/ListRealms/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_RealmsClient_ListRealms] +// [START gameservices_v1_generated_RealmsService_ListRealms_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1_RealmsClient_ListRealms] +// [END gameservices_v1_generated_RealmsService_ListRealms_sync] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/NewRealmsClient/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/NewRealmsClient/main.go deleted file mode 100644 index ebe32cceeff..00000000000 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/NewRealmsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1_NewRealmsClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewRealmsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1_NewRealmsClient] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/PreviewRealmUpdate/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/PreviewRealmUpdate/main.go index 7818771de41..b9a504f81bf 100644 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/PreviewRealmUpdate/main.go +++ b/internal/generated/snippets/gaming/apiv1/RealmsClient/PreviewRealmUpdate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_RealmsClient_PreviewRealmUpdate] +// [START gameservices_v1_generated_RealmsService_PreviewRealmUpdate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_RealmsClient_PreviewRealmUpdate] +// [END gameservices_v1_generated_RealmsService_PreviewRealmUpdate_sync] diff --git a/internal/generated/snippets/gaming/apiv1/RealmsClient/UpdateRealm/main.go b/internal/generated/snippets/gaming/apiv1/RealmsClient/UpdateRealm/main.go index ffd52b901dc..d20fa985ead 100644 --- a/internal/generated/snippets/gaming/apiv1/RealmsClient/UpdateRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1/RealmsClient/UpdateRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1_RealmsClient_UpdateRealm] +// [START gameservices_v1_generated_RealmsService_UpdateRealm_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1_RealmsClient_UpdateRealm] +// [END gameservices_v1_generated_RealmsService_UpdateRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/CreateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/CreateGameServerCluster/main.go index 6919f019b44..933f38b59b6 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/CreateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/CreateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_CreateGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_CreateGameServerCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_CreateGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_CreateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/DeleteGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/DeleteGameServerCluster/main.go index 495b5f98cda..1ca71d53b76 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/DeleteGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/DeleteGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_DeleteGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_DeleteGameServerCluster_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_DeleteGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_DeleteGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/GetGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/GetGameServerCluster/main.go index 2eab88c1544..5dfd95450c2 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/GetGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/GetGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_GetGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_GetGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_GetGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_GetGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/ListGameServerClusters/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/ListGameServerClusters/main.go index ac6754221a7..eb0b621684b 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/ListGameServerClusters/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/ListGameServerClusters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_ListGameServerClusters] +// [START gameservices_v1beta_generated_GameServerClustersService_ListGameServerClusters_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_ListGameServerClusters] +// [END gameservices_v1beta_generated_GameServerClustersService_ListGameServerClusters_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/NewGameServerClustersClient/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/NewGameServerClustersClient/main.go deleted file mode 100644 index ef16985c7bb..00000000000 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/NewGameServerClustersClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1beta_NewGameServerClustersClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewGameServerClustersClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1beta_NewGameServerClustersClient] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewCreateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewCreateGameServerCluster/main.go index e39e457ebc4..5fdb469087c 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewCreateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewCreateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_PreviewCreateGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_PreviewCreateGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_PreviewCreateGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_PreviewCreateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go index a81cbd4c33c..7066716cfa8 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewDeleteGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_PreviewDeleteGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_PreviewDeleteGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_PreviewDeleteGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_PreviewDeleteGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go index eeac96791fa..23d32b0d2ce 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/PreviewUpdateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_PreviewUpdateGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_PreviewUpdateGameServerCluster_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_PreviewUpdateGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_PreviewUpdateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/UpdateGameServerCluster/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/UpdateGameServerCluster/main.go index 824b38daf5e..08bfce06cd4 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/UpdateGameServerCluster/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerClustersClient/UpdateGameServerCluster/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerClustersClient_UpdateGameServerCluster] +// [START gameservices_v1beta_generated_GameServerClustersService_UpdateGameServerCluster_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerClustersClient_UpdateGameServerCluster] +// [END gameservices_v1beta_generated_GameServerClustersService_UpdateGameServerCluster_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/CreateGameServerConfig/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/CreateGameServerConfig/main.go index 0f15a2f5cfd..5dcf5b1dd59 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/CreateGameServerConfig/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/CreateGameServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_CreateGameServerConfig] +// [START gameservices_v1beta_generated_GameServerConfigsService_CreateGameServerConfig_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_CreateGameServerConfig] +// [END gameservices_v1beta_generated_GameServerConfigsService_CreateGameServerConfig_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/DeleteGameServerConfig/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/DeleteGameServerConfig/main.go index 3b36be38561..cf8890825a5 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/DeleteGameServerConfig/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/DeleteGameServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_DeleteGameServerConfig] +// [START gameservices_v1beta_generated_GameServerConfigsService_DeleteGameServerConfig_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_DeleteGameServerConfig] +// [END gameservices_v1beta_generated_GameServerConfigsService_DeleteGameServerConfig_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/GetGameServerConfig/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/GetGameServerConfig/main.go index 4ea6198e511..117fa790ab9 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/GetGameServerConfig/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/GetGameServerConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_GetGameServerConfig] +// [START gameservices_v1beta_generated_GameServerConfigsService_GetGameServerConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_GetGameServerConfig] +// [END gameservices_v1beta_generated_GameServerConfigsService_GetGameServerConfig_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/ListGameServerConfigs/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/ListGameServerConfigs/main.go index 37349946305..bb035d872e4 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/ListGameServerConfigs/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/ListGameServerConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_ListGameServerConfigs] +// [START gameservices_v1beta_generated_GameServerConfigsService_ListGameServerConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_GameServerConfigsClient_ListGameServerConfigs] +// [END gameservices_v1beta_generated_GameServerConfigsService_ListGameServerConfigs_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/NewGameServerConfigsClient/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/NewGameServerConfigsClient/main.go deleted file mode 100644 index d1408adde83..00000000000 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerConfigsClient/NewGameServerConfigsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1beta_NewGameServerConfigsClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewGameServerConfigsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1beta_NewGameServerConfigsClient] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/CreateGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/CreateGameServerDeployment/main.go index 48d21f388ae..527d5deb421 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/CreateGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/CreateGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_CreateGameServerDeployment] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_CreateGameServerDeployment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_CreateGameServerDeployment] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_CreateGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go index febfa206104..6caf9bbbc0a 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/DeleteGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_DeleteGameServerDeployment] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_DeleteGameServerDeployment_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_DeleteGameServerDeployment] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_DeleteGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/FetchDeploymentState/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/FetchDeploymentState/main.go index 4623eb0db19..98c88150507 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/FetchDeploymentState/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/FetchDeploymentState/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_FetchDeploymentState] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_FetchDeploymentState_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_FetchDeploymentState] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_FetchDeploymentState_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeployment/main.go index 18a46e4737e..6480af68ba9 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_GetGameServerDeployment] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_GetGameServerDeployment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_GetGameServerDeployment] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_GetGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go index 078a43ebd23..3d9401f4360 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/GetGameServerDeploymentRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_GetGameServerDeploymentRollout] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_GetGameServerDeploymentRollout_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_GetGameServerDeploymentRollout] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_GetGameServerDeploymentRollout_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/ListGameServerDeployments/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/ListGameServerDeployments/main.go index 20e73ba1386..3ddbcc51c1a 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/ListGameServerDeployments/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/ListGameServerDeployments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_ListGameServerDeployments] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_ListGameServerDeployments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_ListGameServerDeployments] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_ListGameServerDeployments_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/NewGameServerDeploymentsClient/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/NewGameServerDeploymentsClient/main.go deleted file mode 100644 index d79ff0d77b3..00000000000 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/NewGameServerDeploymentsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1beta_NewGameServerDeploymentsClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewGameServerDeploymentsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1beta_NewGameServerDeploymentsClient] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go index a8a04d960a7..ea91b9108aa 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/PreviewGameServerDeploymentRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_PreviewGameServerDeploymentRollout] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_PreviewGameServerDeploymentRollout_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_PreviewGameServerDeploymentRollout] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_PreviewGameServerDeploymentRollout_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go index 7f2a3d8af11..3c4fc40e6b8 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_UpdateGameServerDeployment] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_UpdateGameServerDeployment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_UpdateGameServerDeployment] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_UpdateGameServerDeployment_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go index dbd31778cc1..2d7c99238f6 100644 --- a/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/GameServerDeploymentsClient/UpdateGameServerDeploymentRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_UpdateGameServerDeploymentRollout] +// [START gameservices_v1beta_generated_GameServerDeploymentsService_UpdateGameServerDeploymentRollout_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_GameServerDeploymentsClient_UpdateGameServerDeploymentRollout] +// [END gameservices_v1beta_generated_GameServerDeploymentsService_UpdateGameServerDeploymentRollout_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/CreateRealm/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/CreateRealm/main.go index 4c5bb0a75b8..984e23fd855 100644 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/CreateRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/CreateRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_RealmsClient_CreateRealm] +// [START gameservices_v1beta_generated_RealmsService_CreateRealm_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_RealmsClient_CreateRealm] +// [END gameservices_v1beta_generated_RealmsService_CreateRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/DeleteRealm/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/DeleteRealm/main.go index eba6fddeadc..769d3626099 100644 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/DeleteRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/DeleteRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_RealmsClient_DeleteRealm] +// [START gameservices_v1beta_generated_RealmsService_DeleteRealm_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_RealmsClient_DeleteRealm] +// [END gameservices_v1beta_generated_RealmsService_DeleteRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/GetRealm/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/GetRealm/main.go index 6ff794f4c5d..117e6ad1911 100644 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/GetRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/GetRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_RealmsClient_GetRealm] +// [START gameservices_v1beta_generated_RealmsService_GetRealm_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_RealmsClient_GetRealm] +// [END gameservices_v1beta_generated_RealmsService_GetRealm_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/ListRealms/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/ListRealms/main.go index 102f08b3ebc..947b1bdd96a 100644 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/ListRealms/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/ListRealms/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_RealmsClient_ListRealms] +// [START gameservices_v1beta_generated_RealmsService_ListRealms_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gameservices_generated_gaming_apiv1beta_RealmsClient_ListRealms] +// [END gameservices_v1beta_generated_RealmsService_ListRealms_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/NewRealmsClient/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/NewRealmsClient/main.go deleted file mode 100644 index c0c9f30640d..00000000000 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/NewRealmsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gameservices_generated_gaming_apiv1beta_NewRealmsClient] - -package main - -import ( - "context" - - gaming "cloud.google.com/go/gaming/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := gaming.NewRealmsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gameservices_generated_gaming_apiv1beta_NewRealmsClient] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/PreviewRealmUpdate/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/PreviewRealmUpdate/main.go index 429a5129898..582a31b5934 100644 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/PreviewRealmUpdate/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/PreviewRealmUpdate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_RealmsClient_PreviewRealmUpdate] +// [START gameservices_v1beta_generated_RealmsService_PreviewRealmUpdate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_RealmsClient_PreviewRealmUpdate] +// [END gameservices_v1beta_generated_RealmsService_PreviewRealmUpdate_sync] diff --git a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/UpdateRealm/main.go b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/UpdateRealm/main.go index cdcc66f97e2..1ae7eba4868 100644 --- a/internal/generated/snippets/gaming/apiv1beta/RealmsClient/UpdateRealm/main.go +++ b/internal/generated/snippets/gaming/apiv1beta/RealmsClient/UpdateRealm/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gameservices_generated_gaming_apiv1beta_RealmsClient_UpdateRealm] +// [START gameservices_v1beta_generated_RealmsService_UpdateRealm_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gameservices_generated_gaming_apiv1beta_RealmsClient_UpdateRealm] +// [END gameservices_v1beta_generated_RealmsService_UpdateRealm_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/CreateMembership/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/CreateMembership/main.go index 1caf5b66e4e..c4a1c37aaf8 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/CreateMembership/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/CreateMembership/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_CreateMembership] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_CreateMembership] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/DeleteMembership/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/DeleteMembership/main.go index c01d9584426..3ab1c9713e4 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/DeleteMembership/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/DeleteMembership/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_DeleteMembership] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_DeleteMembership] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateConnectManifest/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateConnectManifest/main.go index b584a3051a8..1fcf2d7f2a2 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateConnectManifest/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateConnectManifest/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_GenerateConnectManifest] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_GenerateConnectManifest_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_GenerateConnectManifest] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GenerateConnectManifest_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateExclusivityManifest/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateExclusivityManifest/main.go index 88f57e41b79..9d38ac263f0 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateExclusivityManifest/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GenerateExclusivityManifest/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_GenerateExclusivityManifest] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_GenerateExclusivityManifest_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_GenerateExclusivityManifest] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GenerateExclusivityManifest_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GetMembership/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GetMembership/main.go index 9a7f06e5669..b2fc357ebdb 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GetMembership/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/GetMembership/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_GetMembership] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_GetMembership_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_GetMembership] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_GetMembership_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ListMemberships/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ListMemberships/main.go index 027e7653681..79bbf3bcd12 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ListMemberships/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ListMemberships/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_ListMemberships] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_ListMemberships_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_ListMemberships] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_ListMemberships_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/NewGkeHubMembershipClient/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/NewGkeHubMembershipClient/main.go deleted file mode 100644 index 2db374fe531..00000000000 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/NewGkeHubMembershipClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START gkehub_generated_gkehub_apiv1beta1_NewGkeHubMembershipClient] - -package main - -import ( - "context" - - gkehub "cloud.google.com/go/gkehub/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := gkehub.NewGkeHubMembershipClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END gkehub_generated_gkehub_apiv1beta1_NewGkeHubMembershipClient] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/UpdateMembership/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/UpdateMembership/main.go index 1fa6243e4c2..50615aa8129 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/UpdateMembership/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/UpdateMembership/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_UpdateMembership] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_UpdateMembership_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_UpdateMembership] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_UpdateMembership_sync] diff --git a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ValidateExclusivity/main.go b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ValidateExclusivity/main.go index fbebcdfe1ea..ca6adea3687 100644 --- a/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ValidateExclusivity/main.go +++ b/internal/generated/snippets/gkehub/apiv1beta1/GkeHubMembershipClient/ValidateExclusivity/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_ValidateExclusivity] +// [START gkehub_v1beta1_generated_GkeHubMembershipService_ValidateExclusivity_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END gkehub_generated_gkehub_apiv1beta1_GkeHubMembershipClient_ValidateExclusivity] +// [END gkehub_v1beta1_generated_GkeHubMembershipService_ValidateExclusivity_sync] diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 47bad9b45a5..6a8fd2326f2 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -25,18 +25,12 @@ replace cloud.google.com/go/storage => ../../../storage require ( cloud.google.com/go v0.81.0 cloud.google.com/go/bigquery v0.0.0-00010101000000-000000000000 - cloud.google.com/go/bigtable v0.0.0-00010101000000-000000000000 cloud.google.com/go/datastore v0.0.0-00010101000000-000000000000 cloud.google.com/go/firestore v0.0.0-00010101000000-000000000000 cloud.google.com/go/logging v0.0.0-00010101000000-000000000000 cloud.google.com/go/pubsub v1.9.1 cloud.google.com/go/pubsublite v0.0.0-00010101000000-000000000000 cloud.google.com/go/spanner v0.0.0-00010101000000-000000000000 - cloud.google.com/go/storage v1.10.0 - go.opencensus.io v0.23.0 - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.45.0 google.golang.org/genproto v0.0.0-20210423144448-3a41ef94ed2b - google.golang.org/grpc v1.37.0 ) diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index 8e9f1f08039..d39951f73e6 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -17,7 +17,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -33,8 +32,6 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -43,17 +40,13 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20210413054141-7c2eacd09c8d h1:X4vWSRcXmxBANxWPGUsfWv291lZUjENBew0l1R/RVRk= github.com/google/pprof v0.0.0-20210413054141-7c2eacd09c8d/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -70,10 +63,8 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -96,7 +87,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -126,7 +116,6 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -144,7 +133,6 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210413151531-c14fb6ef47c3/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210422153429-2279cbceda62/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210423144448-3a41ef94ed2b h1:Rt15zyw7G2yfLqmsjEa1xICjWEw+topkn7vEAR6bVPk= google.golang.org/genproto v0.0.0-20210423144448-3a41ef94ed2b/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -172,5 +160,3 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateRole/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateRole/main.go deleted file mode 100644 index 60110f80d1e..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateRole/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_CreateRole] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.CreateRoleRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.CreateRole(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_CreateRole] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateServiceAccount/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateServiceAccount/main.go deleted file mode 100644 index 7f579c247fa..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateServiceAccount/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_CreateServiceAccount] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.CreateServiceAccountRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.CreateServiceAccount(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_CreateServiceAccount] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateServiceAccountKey/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateServiceAccountKey/main.go deleted file mode 100644 index b21c6b4fb0b..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/CreateServiceAccountKey/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_CreateServiceAccountKey] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.CreateServiceAccountKeyRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.CreateServiceAccountKey(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_CreateServiceAccountKey] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteRole/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteRole/main.go deleted file mode 100644 index 45549fc8ef4..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteRole/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_DeleteRole] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.DeleteRoleRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.DeleteRole(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_DeleteRole] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteServiceAccount/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteServiceAccount/main.go deleted file mode 100644 index 52a12e4b3ff..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteServiceAccount/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_DeleteServiceAccount] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.DeleteServiceAccountRequest{ - // TODO: Fill request struct fields. - } - err = c.DeleteServiceAccount(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END iam_generated_iam_admin_apiv1_IamClient_DeleteServiceAccount] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteServiceAccountKey/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteServiceAccountKey/main.go deleted file mode 100644 index 4dd4d0a3037..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/DeleteServiceAccountKey/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_DeleteServiceAccountKey] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.DeleteServiceAccountKeyRequest{ - // TODO: Fill request struct fields. - } - err = c.DeleteServiceAccountKey(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END iam_generated_iam_admin_apiv1_IamClient_DeleteServiceAccountKey] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/GetRole/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/GetRole/main.go deleted file mode 100644 index f5ad8ff519e..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/GetRole/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_GetRole] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.GetRoleRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetRole(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_GetRole] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/GetServiceAccount/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/GetServiceAccount/main.go deleted file mode 100644 index 7e8db1bc4d8..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/GetServiceAccount/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_GetServiceAccount] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.GetServiceAccountRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetServiceAccount(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_GetServiceAccount] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/GetServiceAccountKey/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/GetServiceAccountKey/main.go deleted file mode 100644 index 290a4489b96..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/GetServiceAccountKey/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_GetServiceAccountKey] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.GetServiceAccountKeyRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetServiceAccountKey(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_GetServiceAccountKey] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/ListRoles/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/ListRoles/main.go deleted file mode 100644 index ca7746e7fbf..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/ListRoles/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_ListRoles] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.ListRolesRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.ListRoles(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_ListRoles] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/ListServiceAccountKeys/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/ListServiceAccountKeys/main.go deleted file mode 100644 index 397421c3a2a..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/ListServiceAccountKeys/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_ListServiceAccountKeys] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.ListServiceAccountKeysRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.ListServiceAccountKeys(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_ListServiceAccountKeys] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/ListServiceAccounts/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/ListServiceAccounts/main.go deleted file mode 100644 index 2571fa82ede..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/ListServiceAccounts/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_ListServiceAccounts] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - "google.golang.org/api/iterator" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.ListServiceAccountsRequest{ - // TODO: Fill request struct fields. - } - it := c.ListServiceAccounts(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END iam_generated_iam_admin_apiv1_IamClient_ListServiceAccounts] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/NewIamClient/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/NewIamClient/main.go deleted file mode 100644 index b751b4d24e6..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/NewIamClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_NewIamClient] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END iam_generated_iam_admin_apiv1_NewIamClient] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/QueryGrantableRoles/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/QueryGrantableRoles/main.go deleted file mode 100644 index 6246a7d3f17..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/QueryGrantableRoles/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_QueryGrantableRoles] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.QueryGrantableRolesRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.QueryGrantableRoles(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_QueryGrantableRoles] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/QueryTestablePermissions/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/QueryTestablePermissions/main.go deleted file mode 100644 index 052733fcb5f..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/QueryTestablePermissions/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_QueryTestablePermissions] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.QueryTestablePermissionsRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.QueryTestablePermissions(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_QueryTestablePermissions] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/SignBlob/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/SignBlob/main.go deleted file mode 100644 index 2d7fd08c614..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/SignBlob/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_SignBlob] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.SignBlobRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.SignBlob(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_SignBlob] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/SignJwt/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/SignJwt/main.go deleted file mode 100644 index c81cc5cefb1..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/SignJwt/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_SignJwt] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.SignJwtRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.SignJwt(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_SignJwt] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/TestIamPermissions/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/TestIamPermissions/main.go deleted file mode 100644 index ba1fce415e9..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/TestIamPermissions/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_TestIamPermissions] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - iampb "google.golang.org/genproto/googleapis/iam/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &iampb.TestIamPermissionsRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.TestIamPermissions(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_TestIamPermissions] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/UndeleteRole/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/UndeleteRole/main.go deleted file mode 100644 index 451ae55506e..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/UndeleteRole/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_UndeleteRole] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.UndeleteRoleRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.UndeleteRole(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_UndeleteRole] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/UpdateRole/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/UpdateRole/main.go deleted file mode 100644 index b483de3ee6c..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/UpdateRole/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_UpdateRole] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.UpdateRoleRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.UpdateRole(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_UpdateRole] diff --git a/internal/generated/snippets/iam/admin/apiv1/IamClient/UpdateServiceAccount/main.go b/internal/generated/snippets/iam/admin/apiv1/IamClient/UpdateServiceAccount/main.go deleted file mode 100644 index 7816294ddad..00000000000 --- a/internal/generated/snippets/iam/admin/apiv1/IamClient/UpdateServiceAccount/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iam_generated_iam_admin_apiv1_IamClient_UpdateServiceAccount] - -package main - -import ( - "context" - - admin "cloud.google.com/go/iam/admin/apiv1" - adminpb "google.golang.org/genproto/googleapis/iam/admin/v1" -) - -func main() { - ctx := context.Background() - c, err := admin.NewIamClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &adminpb.ServiceAccount{ - // TODO: Fill request struct fields. - } - resp, err := c.UpdateServiceAccount(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END iam_generated_iam_admin_apiv1_IamClient_UpdateServiceAccount] diff --git a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateAccessToken/main.go b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateAccessToken/main.go index 40651a534d8..9e4887e1cd9 100644 --- a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateAccessToken/main.go +++ b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateAccessToken/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_GenerateAccessToken] +// [START iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_GenerateAccessToken] +// [END iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] diff --git a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateIdToken/main.go b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateIdToken/main.go index aacc11b778b..baeea5191ed 100644 --- a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateIdToken/main.go +++ b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/GenerateIdToken/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_GenerateIdToken] +// [START iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_GenerateIdToken] +// [END iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] diff --git a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/NewIamCredentialsClient/main.go b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/NewIamCredentialsClient/main.go deleted file mode 100644 index 4aefa4be6af..00000000000 --- a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/NewIamCredentialsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START iamcredentials_generated_iam_credentials_apiv1_NewIamCredentialsClient] - -package main - -import ( - "context" - - credentials "cloud.google.com/go/iam/credentials/apiv1" -) - -func main() { - ctx := context.Background() - c, err := credentials.NewIamCredentialsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END iamcredentials_generated_iam_credentials_apiv1_NewIamCredentialsClient] diff --git a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignBlob/main.go b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignBlob/main.go index 4118ab28173..600c9e824d1 100644 --- a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignBlob/main.go +++ b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignBlob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_SignBlob] +// [START iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_SignBlob] +// [END iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] diff --git a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignJwt/main.go b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignJwt/main.go index 1ad018c5339..ff5cd518692 100644 --- a/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignJwt/main.go +++ b/internal/generated/snippets/iam/credentials/apiv1/IamCredentialsClient/SignJwt/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_SignJwt] +// [START iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END iamcredentials_generated_iam_credentials_apiv1_IamCredentialsClient_SignJwt] +// [END iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/BindDeviceToGateway/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/BindDeviceToGateway/main.go index 525830aa91e..3e8549221a6 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/BindDeviceToGateway/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/BindDeviceToGateway/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_BindDeviceToGateway] +// [START cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_BindDeviceToGateway] +// [END cloudiot_v1_generated_DeviceManager_BindDeviceToGateway_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDevice/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDevice/main.go index c46ba0be8c3..d909e28abda 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDevice/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDevice/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_CreateDevice] +// [START cloudiot_v1_generated_DeviceManager_CreateDevice_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_CreateDevice] +// [END cloudiot_v1_generated_DeviceManager_CreateDevice_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDeviceRegistry/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDeviceRegistry/main.go index 351d2632d27..05b0f9aa0e6 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDeviceRegistry/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/CreateDeviceRegistry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_CreateDeviceRegistry] +// [START cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_CreateDeviceRegistry] +// [END cloudiot_v1_generated_DeviceManager_CreateDeviceRegistry_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDevice/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDevice/main.go index 987ed01b1dd..afcf65eda0f 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDevice/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDevice/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_DeleteDevice] +// [START cloudiot_v1_generated_DeviceManager_DeleteDevice_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_DeleteDevice] +// [END cloudiot_v1_generated_DeviceManager_DeleteDevice_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDeviceRegistry/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDeviceRegistry/main.go index 65c38dd5998..6f0ec767426 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDeviceRegistry/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/DeleteDeviceRegistry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_DeleteDeviceRegistry] +// [START cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_DeleteDeviceRegistry] +// [END cloudiot_v1_generated_DeviceManager_DeleteDeviceRegistry_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDevice/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDevice/main.go index ff04f4b13ca..884e7fb174c 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDevice/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDevice/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_GetDevice] +// [START cloudiot_v1_generated_DeviceManager_GetDevice_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_GetDevice] +// [END cloudiot_v1_generated_DeviceManager_GetDevice_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDeviceRegistry/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDeviceRegistry/main.go index f7a1931f9ac..d740e29b699 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDeviceRegistry/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetDeviceRegistry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_GetDeviceRegistry] +// [START cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_GetDeviceRegistry] +// [END cloudiot_v1_generated_DeviceManager_GetDeviceRegistry_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetIamPolicy/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetIamPolicy/main.go index 2d43c3788f3..94c011bbbd5 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_GetIamPolicy] +// [START cloudiot_v1_generated_DeviceManager_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_GetIamPolicy] +// [END cloudiot_v1_generated_DeviceManager_GetIamPolicy_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceConfigVersions/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceConfigVersions/main.go index ebc93ff5dee..29ba0f7fe29 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceConfigVersions/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceConfigVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDeviceConfigVersions] +// [START cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDeviceConfigVersions] +// [END cloudiot_v1_generated_DeviceManager_ListDeviceConfigVersions_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceRegistries/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceRegistries/main.go index 35d2b962f56..b5e85817c0d 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceRegistries/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceRegistries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDeviceRegistries] +// [START cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDeviceRegistries] +// [END cloudiot_v1_generated_DeviceManager_ListDeviceRegistries_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceStates/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceStates/main.go index 4357d613655..02dc29781e8 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceStates/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDeviceStates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDeviceStates] +// [START cloudiot_v1_generated_DeviceManager_ListDeviceStates_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDeviceStates] +// [END cloudiot_v1_generated_DeviceManager_ListDeviceStates_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDevices/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDevices/main.go index 73679c43a3a..1fd349760af 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDevices/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ListDevices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDevices] +// [START cloudiot_v1_generated_DeviceManager_ListDevices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_ListDevices] +// [END cloudiot_v1_generated_DeviceManager_ListDevices_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ModifyCloudToDeviceConfig/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ModifyCloudToDeviceConfig/main.go index 5039ae59483..2f11f99004d 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ModifyCloudToDeviceConfig/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/ModifyCloudToDeviceConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_ModifyCloudToDeviceConfig] +// [START cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_ModifyCloudToDeviceConfig] +// [END cloudiot_v1_generated_DeviceManager_ModifyCloudToDeviceConfig_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/NewDeviceManagerClient/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/NewDeviceManagerClient/main.go deleted file mode 100644 index 703c9ceaf3f..00000000000 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/NewDeviceManagerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudiot_generated_iot_apiv1_NewDeviceManagerClient] - -package main - -import ( - "context" - - iot "cloud.google.com/go/iot/apiv1" -) - -func main() { - ctx := context.Background() - c, err := iot.NewDeviceManagerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudiot_generated_iot_apiv1_NewDeviceManagerClient] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SendCommandToDevice/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SendCommandToDevice/main.go index 515f400a683..3d49a174ce6 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SendCommandToDevice/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SendCommandToDevice/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_SendCommandToDevice] +// [START cloudiot_v1_generated_DeviceManager_SendCommandToDevice_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_SendCommandToDevice] +// [END cloudiot_v1_generated_DeviceManager_SendCommandToDevice_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SetIamPolicy/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SetIamPolicy/main.go index 111f52e1e59..ffef68cdcb3 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_SetIamPolicy] +// [START cloudiot_v1_generated_DeviceManager_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_SetIamPolicy] +// [END cloudiot_v1_generated_DeviceManager_SetIamPolicy_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/TestIamPermissions/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/TestIamPermissions/main.go index 7a4e574ecb7..d24b2995bdf 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_TestIamPermissions] +// [START cloudiot_v1_generated_DeviceManager_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_TestIamPermissions] +// [END cloudiot_v1_generated_DeviceManager_TestIamPermissions_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UnbindDeviceFromGateway/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UnbindDeviceFromGateway/main.go index 5a51e4e3115..53648e64210 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UnbindDeviceFromGateway/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UnbindDeviceFromGateway/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_UnbindDeviceFromGateway] +// [START cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_UnbindDeviceFromGateway] +// [END cloudiot_v1_generated_DeviceManager_UnbindDeviceFromGateway_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDevice/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDevice/main.go index 4b0d5950a05..4fcdb0c5363 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDevice/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDevice/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_UpdateDevice] +// [START cloudiot_v1_generated_DeviceManager_UpdateDevice_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_UpdateDevice] +// [END cloudiot_v1_generated_DeviceManager_UpdateDevice_sync] diff --git a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDeviceRegistry/main.go b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDeviceRegistry/main.go index 63236c3d1b0..01ef6e621cb 100644 --- a/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDeviceRegistry/main.go +++ b/internal/generated/snippets/iot/apiv1/DeviceManagerClient/UpdateDeviceRegistry/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudiot_generated_iot_apiv1_DeviceManagerClient_UpdateDeviceRegistry] +// [START cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudiot_generated_iot_apiv1_DeviceManagerClient_UpdateDeviceRegistry] +// [END cloudiot_v1_generated_DeviceManager_UpdateDeviceRegistry_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricDecrypt/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricDecrypt/main.go index f975b1406c7..14768d2a6c0 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricDecrypt/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricDecrypt/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_AsymmetricDecrypt] +// [START cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_AsymmetricDecrypt] +// [END cloudkms_v1_generated_KeyManagementService_AsymmetricDecrypt_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricSign/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricSign/main.go index a16b1edf1e7..252ca7ab3f8 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricSign/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/AsymmetricSign/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_AsymmetricSign] +// [START cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_AsymmetricSign] +// [END cloudkms_v1_generated_KeyManagementService_AsymmetricSign_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKey/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKey/main.go index 20f61e1f803..a42e42c0813 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKey/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_CreateCryptoKey] +// [START cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_CreateCryptoKey] +// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKey_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKeyVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKeyVersion/main.go index 7129199329a..2b4faf5752b 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKeyVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateCryptoKeyVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_CreateCryptoKeyVersion] +// [START cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_CreateCryptoKeyVersion] +// [END cloudkms_v1_generated_KeyManagementService_CreateCryptoKeyVersion_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateImportJob/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateImportJob/main.go index e932d664aaa..8f3484dacd1 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateImportJob/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateImportJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_CreateImportJob] +// [START cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_CreateImportJob] +// [END cloudkms_v1_generated_KeyManagementService_CreateImportJob_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateKeyRing/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateKeyRing/main.go index 81ae291e230..1430d317210 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateKeyRing/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/CreateKeyRing/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_CreateKeyRing] +// [START cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_CreateKeyRing] +// [END cloudkms_v1_generated_KeyManagementService_CreateKeyRing_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/Decrypt/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/Decrypt/main.go index 874af50dc4e..a80a7702a50 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/Decrypt/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/Decrypt/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_Decrypt] +// [START cloudkms_v1_generated_KeyManagementService_Decrypt_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_Decrypt] +// [END cloudkms_v1_generated_KeyManagementService_Decrypt_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/DestroyCryptoKeyVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/DestroyCryptoKeyVersion/main.go index 581cf76506d..9ace7d1f798 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/DestroyCryptoKeyVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/DestroyCryptoKeyVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_DestroyCryptoKeyVersion] +// [START cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_DestroyCryptoKeyVersion] +// [END cloudkms_v1_generated_KeyManagementService_DestroyCryptoKeyVersion_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/Encrypt/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/Encrypt/main.go index e1b225130ce..643110a539f 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/Encrypt/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/Encrypt/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_Encrypt] +// [START cloudkms_v1_generated_KeyManagementService_Encrypt_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_Encrypt] +// [END cloudkms_v1_generated_KeyManagementService_Encrypt_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKey/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKey/main.go index d660e4dde3c..df98e30054d 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKey/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_GetCryptoKey] +// [START cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_GetCryptoKey] +// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKey_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKeyVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKeyVersion/main.go index a561b10a4b1..293dd8834f6 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKeyVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetCryptoKeyVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_GetCryptoKeyVersion] +// [START cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_GetCryptoKeyVersion] +// [END cloudkms_v1_generated_KeyManagementService_GetCryptoKeyVersion_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetImportJob/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetImportJob/main.go index 87757e85201..457e8d946f2 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetImportJob/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetImportJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_GetImportJob] +// [START cloudkms_v1_generated_KeyManagementService_GetImportJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_GetImportJob] +// [END cloudkms_v1_generated_KeyManagementService_GetImportJob_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetKeyRing/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetKeyRing/main.go index de55770d88f..40d8e147ac7 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetKeyRing/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetKeyRing/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_GetKeyRing] +// [START cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_GetKeyRing] +// [END cloudkms_v1_generated_KeyManagementService_GetKeyRing_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetPublicKey/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetPublicKey/main.go index d74f87e2005..a5bae62e5a8 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetPublicKey/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/GetPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_GetPublicKey] +// [START cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_GetPublicKey] +// [END cloudkms_v1_generated_KeyManagementService_GetPublicKey_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ImportCryptoKeyVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ImportCryptoKeyVersion/main.go index 504ce937db6..e393f93a3c3 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ImportCryptoKeyVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ImportCryptoKeyVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_ImportCryptoKeyVersion] +// [START cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_ImportCryptoKeyVersion] +// [END cloudkms_v1_generated_KeyManagementService_ImportCryptoKeyVersion_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeyVersions/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeyVersions/main.go index dc513cf0669..cfe548af862 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeyVersions/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeyVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_ListCryptoKeyVersions] +// [START cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_ListCryptoKeyVersions] +// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeyVersions_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeys/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeys/main.go index 8dc4fcb21d2..e734bbee1f5 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeys/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListCryptoKeys/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_ListCryptoKeys] +// [START cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_ListCryptoKeys] +// [END cloudkms_v1_generated_KeyManagementService_ListCryptoKeys_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListImportJobs/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListImportJobs/main.go index 42ecb424aff..c4ccb52e173 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListImportJobs/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListImportJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_ListImportJobs] +// [START cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_ListImportJobs] +// [END cloudkms_v1_generated_KeyManagementService_ListImportJobs_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListKeyRings/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListKeyRings/main.go index 387455a12f7..904b1f0a10f 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListKeyRings/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ListKeyRings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_ListKeyRings] +// [START cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_ListKeyRings] +// [END cloudkms_v1_generated_KeyManagementService_ListKeyRings_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/NewKeyManagementClient/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/NewKeyManagementClient/main.go deleted file mode 100644 index 619aaaa49b5..00000000000 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/NewKeyManagementClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudkms_generated_kms_apiv1_NewKeyManagementClient] - -package main - -import ( - "context" - - kms "cloud.google.com/go/kms/apiv1" -) - -func main() { - ctx := context.Background() - c, err := kms.NewKeyManagementClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudkms_generated_kms_apiv1_NewKeyManagementClient] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ResourceIAM/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/ResourceIAM/main.go deleted file mode 100644 index 28ab66d2314..00000000000 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/ResourceIAM/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_ResourceIAM] - -package main - -import ( - "context" - - kms "cloud.google.com/go/kms/apiv1" -) - -func main() { - ctx := context.Background() - c, err := kms.NewKeyManagementClient(ctx) - if err != nil { - // TODO: Handle error. - } - - // TODO: fill in key ring resource path - keyRing := "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]" - handle := c.ResourceIAM(keyRing) - - policy, err := handle.Policy(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use policy. - _ = policy -} - -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_ResourceIAM] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/RestoreCryptoKeyVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/RestoreCryptoKeyVersion/main.go index 5f879f57f79..0b67adef365 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/RestoreCryptoKeyVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/RestoreCryptoKeyVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_RestoreCryptoKeyVersion] +// [START cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_RestoreCryptoKeyVersion] +// [END cloudkms_v1_generated_KeyManagementService_RestoreCryptoKeyVersion_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKey/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKey/main.go index 645192a830c..8996d6b2b24 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKey/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_UpdateCryptoKey] +// [START cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_UpdateCryptoKey] +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKey_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyPrimaryVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyPrimaryVersion/main.go index e0b9f04368c..212ae73e768 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyPrimaryVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyPrimaryVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_UpdateCryptoKeyPrimaryVersion] +// [START cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_UpdateCryptoKeyPrimaryVersion] +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyPrimaryVersion_sync] diff --git a/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyVersion/main.go b/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyVersion/main.go index fc514ab16c7..222bdbf3d96 100644 --- a/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyVersion/main.go +++ b/internal/generated/snippets/kms/apiv1/KeyManagementClient/UpdateCryptoKeyVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudkms_generated_kms_apiv1_KeyManagementClient_UpdateCryptoKeyVersion] +// [START cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudkms_generated_kms_apiv1_KeyManagementClient_UpdateCryptoKeyVersion] +// [END cloudkms_v1_generated_KeyManagementService_UpdateCryptoKeyVersion_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/AnalyzeEntities/main.go b/internal/generated/snippets/language/apiv1/Client/AnalyzeEntities/main.go index 961028ffd0c..bdc40a743af 100644 --- a/internal/generated/snippets/language/apiv1/Client/AnalyzeEntities/main.go +++ b/internal/generated/snippets/language/apiv1/Client/AnalyzeEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1_Client_AnalyzeEntities] +// [START language_v1_generated_LanguageService_AnalyzeEntities_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1_Client_AnalyzeEntities] +// [END language_v1_generated_LanguageService_AnalyzeEntities_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/AnalyzeEntitySentiment/main.go b/internal/generated/snippets/language/apiv1/Client/AnalyzeEntitySentiment/main.go index 0d101418632..0313f94576d 100644 --- a/internal/generated/snippets/language/apiv1/Client/AnalyzeEntitySentiment/main.go +++ b/internal/generated/snippets/language/apiv1/Client/AnalyzeEntitySentiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1_Client_AnalyzeEntitySentiment] +// [START language_v1_generated_LanguageService_AnalyzeEntitySentiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1_Client_AnalyzeEntitySentiment] +// [END language_v1_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/AnalyzeSentiment/main.go b/internal/generated/snippets/language/apiv1/Client/AnalyzeSentiment/main.go index 9e6c61bb736..17b44126e8f 100644 --- a/internal/generated/snippets/language/apiv1/Client/AnalyzeSentiment/main.go +++ b/internal/generated/snippets/language/apiv1/Client/AnalyzeSentiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1_Client_AnalyzeSentiment] +// [START language_v1_generated_LanguageService_AnalyzeSentiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1_Client_AnalyzeSentiment] +// [END language_v1_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/AnalyzeSyntax/main.go b/internal/generated/snippets/language/apiv1/Client/AnalyzeSyntax/main.go index 952e1d039d7..cef87d6fad5 100644 --- a/internal/generated/snippets/language/apiv1/Client/AnalyzeSyntax/main.go +++ b/internal/generated/snippets/language/apiv1/Client/AnalyzeSyntax/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1_Client_AnalyzeSyntax] +// [START language_v1_generated_LanguageService_AnalyzeSyntax_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1_Client_AnalyzeSyntax] +// [END language_v1_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/AnnotateText/main.go b/internal/generated/snippets/language/apiv1/Client/AnnotateText/main.go index aef8a45977f..3f05b2bc2ea 100644 --- a/internal/generated/snippets/language/apiv1/Client/AnnotateText/main.go +++ b/internal/generated/snippets/language/apiv1/Client/AnnotateText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1_Client_AnnotateText] +// [START language_v1_generated_LanguageService_AnnotateText_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1_Client_AnnotateText] +// [END language_v1_generated_LanguageService_AnnotateText_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/ClassifyText/main.go b/internal/generated/snippets/language/apiv1/Client/ClassifyText/main.go index 146c50d5fe3..34f4f267c8b 100644 --- a/internal/generated/snippets/language/apiv1/Client/ClassifyText/main.go +++ b/internal/generated/snippets/language/apiv1/Client/ClassifyText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1_Client_ClassifyText] +// [START language_v1_generated_LanguageService_ClassifyText_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1_Client_ClassifyText] +// [END language_v1_generated_LanguageService_ClassifyText_sync] diff --git a/internal/generated/snippets/language/apiv1/Client/NewClient/main.go b/internal/generated/snippets/language/apiv1/Client/NewClient/main.go deleted file mode 100644 index 31e29b0e773..00000000000 --- a/internal/generated/snippets/language/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START language_generated_language_apiv1_NewClient] - -package main - -import ( - "context" - - language "cloud.google.com/go/language/apiv1" -) - -func main() { - ctx := context.Background() - c, err := language.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END language_generated_language_apiv1_NewClient] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntities/main.go b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntities/main.go index 08101a702b8..e1cf5741ca9 100644 --- a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntities/main.go +++ b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1beta2_Client_AnalyzeEntities] +// [START language_v1beta2_generated_LanguageService_AnalyzeEntities_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1beta2_Client_AnalyzeEntities] +// [END language_v1beta2_generated_LanguageService_AnalyzeEntities_sync] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntitySentiment/main.go b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntitySentiment/main.go index 6542382b453..0477343cbc4 100644 --- a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntitySentiment/main.go +++ b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeEntitySentiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1beta2_Client_AnalyzeEntitySentiment] +// [START language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1beta2_Client_AnalyzeEntitySentiment] +// [END language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_sync] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSentiment/main.go b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSentiment/main.go index bf791eae022..69538157438 100644 --- a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSentiment/main.go +++ b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSentiment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1beta2_Client_AnalyzeSentiment] +// [START language_v1beta2_generated_LanguageService_AnalyzeSentiment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1beta2_Client_AnalyzeSentiment] +// [END language_v1beta2_generated_LanguageService_AnalyzeSentiment_sync] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSyntax/main.go b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSyntax/main.go index 21fd3d2e847..1d5c77b6aa6 100644 --- a/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSyntax/main.go +++ b/internal/generated/snippets/language/apiv1beta2/Client/AnalyzeSyntax/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1beta2_Client_AnalyzeSyntax] +// [START language_v1beta2_generated_LanguageService_AnalyzeSyntax_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1beta2_Client_AnalyzeSyntax] +// [END language_v1beta2_generated_LanguageService_AnalyzeSyntax_sync] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/AnnotateText/main.go b/internal/generated/snippets/language/apiv1beta2/Client/AnnotateText/main.go index 9c54a11cb65..a695cc42ea5 100644 --- a/internal/generated/snippets/language/apiv1beta2/Client/AnnotateText/main.go +++ b/internal/generated/snippets/language/apiv1beta2/Client/AnnotateText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1beta2_Client_AnnotateText] +// [START language_v1beta2_generated_LanguageService_AnnotateText_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1beta2_Client_AnnotateText] +// [END language_v1beta2_generated_LanguageService_AnnotateText_sync] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/ClassifyText/main.go b/internal/generated/snippets/language/apiv1beta2/Client/ClassifyText/main.go index 081dac9fcc3..dc65e4ce44c 100644 --- a/internal/generated/snippets/language/apiv1beta2/Client/ClassifyText/main.go +++ b/internal/generated/snippets/language/apiv1beta2/Client/ClassifyText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START language_generated_language_apiv1beta2_Client_ClassifyText] +// [START language_v1beta2_generated_LanguageService_ClassifyText_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END language_generated_language_apiv1beta2_Client_ClassifyText] +// [END language_v1beta2_generated_LanguageService_ClassifyText_sync] diff --git a/internal/generated/snippets/language/apiv1beta2/Client/NewClient/main.go b/internal/generated/snippets/language/apiv1beta2/Client/NewClient/main.go deleted file mode 100644 index ebbabf8fed1..00000000000 --- a/internal/generated/snippets/language/apiv1beta2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START language_generated_language_apiv1beta2_NewClient] - -package main - -import ( - "context" - - language "cloud.google.com/go/language/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := language.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END language_generated_language_apiv1beta2_NewClient] diff --git a/internal/generated/snippets/logging/Client/Logger/main.go b/internal/generated/snippets/logging/Client/Logger/main.go deleted file mode 100644 index 4caaa3e8334..00000000000 --- a/internal/generated/snippets/logging/Client/Logger/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Client_Logger] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - _ = lg // TODO: use the Logger. -} - -// [END logging_generated_logging_Client_Logger] diff --git a/internal/generated/snippets/logging/Client/NewClient/errorFunc/main.go b/internal/generated/snippets/logging/Client/NewClient/errorFunc/main.go deleted file mode 100644 index f24609ce59c..00000000000 --- a/internal/generated/snippets/logging/Client/NewClient/errorFunc/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_NewClient_errorFunc] - -package main - -import ( - "context" - "fmt" - "os" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - // Print all errors to stdout, and count them. Multiple calls to the OnError - // function never happen concurrently, so there is no need for locking nErrs, - // provided you don't read it until after the logging client is closed. - var nErrs int - client.OnError = func(e error) { - fmt.Fprintf(os.Stdout, "logging: %v", e) - nErrs++ - } - // Use client to manage logs, metrics and sinks. - // Close the client when finished. - if err := client.Close(); err != nil { - // TODO: Handle error. - } - fmt.Printf("saw %d errors\n", nErrs) -} - -// [END logging_generated_logging_NewClient_errorFunc] diff --git a/internal/generated/snippets/logging/Client/NewClient/main.go b/internal/generated/snippets/logging/Client/NewClient/main.go deleted file mode 100644 index 3a558b7a749..00000000000 --- a/internal/generated/snippets/logging/Client/NewClient/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - // Use client to manage logs, metrics and sinks. - // Close the client when finished. - if err := client.Close(); err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_NewClient] diff --git a/internal/generated/snippets/logging/Client/Ping/main.go b/internal/generated/snippets/logging/Client/Ping/main.go deleted file mode 100644 index 1a7c1db9693..00000000000 --- a/internal/generated/snippets/logging/Client/Ping/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Client_Ping] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - if err := client.Ping(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_Client_Ping] diff --git a/internal/generated/snippets/logging/HTTPRequest/main.go b/internal/generated/snippets/logging/HTTPRequest/main.go deleted file mode 100644 index 0bc22f85a59..00000000000 --- a/internal/generated/snippets/logging/HTTPRequest/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_HTTPRequest] - -package main - -import ( - "context" - "net/http" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - httpEntry := logging.Entry{ - Payload: "optional message", - HTTPRequest: &logging.HTTPRequest{ - // TODO: pass in request - Request: &http.Request{}, - // TODO: set the status code - Status: http.StatusOK, - }, - } - lg.Log(httpEntry) -} - -// [END logging_generated_logging_HTTPRequest] diff --git a/internal/generated/snippets/logging/Logger/Flush/main.go b/internal/generated/snippets/logging/Logger/Flush/main.go deleted file mode 100644 index 9045e8c0d0c..00000000000 --- a/internal/generated/snippets/logging/Logger/Flush/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Logger_Flush] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - lg.Log(logging.Entry{Payload: "something happened"}) - lg.Flush() -} - -// [END logging_generated_logging_Logger_Flush] diff --git a/internal/generated/snippets/logging/Logger/Log/json/main.go b/internal/generated/snippets/logging/Logger/Log/json/main.go deleted file mode 100644 index 4e0e0999250..00000000000 --- a/internal/generated/snippets/logging/Logger/Log/json/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Logger_Log_json] - -package main - -import ( - "context" - "encoding/json" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - j := []byte(`{"Name": "Bob", "Count": 3}`) - lg.Log(logging.Entry{Payload: json.RawMessage(j)}) -} - -// [END logging_generated_logging_Logger_Log_json] diff --git a/internal/generated/snippets/logging/Logger/Log/main.go b/internal/generated/snippets/logging/Logger/Log/main.go deleted file mode 100644 index 67177afd470..00000000000 --- a/internal/generated/snippets/logging/Logger/Log/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Logger_Log] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - lg.Log(logging.Entry{Payload: "something happened"}) -} - -// [END logging_generated_logging_Logger_Log] diff --git a/internal/generated/snippets/logging/Logger/Log/struct/main.go b/internal/generated/snippets/logging/Logger/Log/struct/main.go deleted file mode 100644 index 5b762d191a0..00000000000 --- a/internal/generated/snippets/logging/Logger/Log/struct/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Logger_Log_struct] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - type MyEntry struct { - Name string - Count int - } - - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - lg.Log(logging.Entry{Payload: MyEntry{Name: "Bob", Count: 3}}) -} - -// [END logging_generated_logging_Logger_Log_struct] diff --git a/internal/generated/snippets/logging/Logger/LogSync/main.go b/internal/generated/snippets/logging/Logger/LogSync/main.go deleted file mode 100644 index 5104f584e2e..00000000000 --- a/internal/generated/snippets/logging/Logger/LogSync/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Logger_LogSync] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - err = lg.LogSync(ctx, logging.Entry{Payload: "red alert"}) - if err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_Logger_LogSync] diff --git a/internal/generated/snippets/logging/Logger/StandardLogger/main.go b/internal/generated/snippets/logging/Logger/StandardLogger/main.go deleted file mode 100644 index 886af123bbc..00000000000 --- a/internal/generated/snippets/logging/Logger/StandardLogger/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_Logger_StandardLogger] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("my-log") - slg := lg.StandardLogger(logging.Info) - slg.Println("an informative message") -} - -// [END logging_generated_logging_Logger_StandardLogger] diff --git a/internal/generated/snippets/logging/LoggerOption/ContextFunc/main.go b/internal/generated/snippets/logging/LoggerOption/ContextFunc/main.go deleted file mode 100644 index 8ecfb3442e8..00000000000 --- a/internal/generated/snippets/logging/LoggerOption/ContextFunc/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_ContextFunc] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" - "go.opencensus.io/trace" -) - -func main() { - ctx := context.Background() - client, err := logging.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - lg := client.Logger("logID", logging.ContextFunc(func() (context.Context, func()) { - ctx, span := trace.StartSpan(context.Background(), "this span will not be exported", - trace.WithSampler(trace.NeverSample())) - return ctx, span.End - })) - _ = lg // TODO: Use lg -} - -// [END logging_generated_logging_ContextFunc] diff --git a/internal/generated/snippets/logging/Severity/ParseSeverity/main.go b/internal/generated/snippets/logging/Severity/ParseSeverity/main.go deleted file mode 100644 index e4a22107bcc..00000000000 --- a/internal/generated/snippets/logging/Severity/ParseSeverity/main.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_ParseSeverity] - -package main - -import ( - "fmt" - - "cloud.google.com/go/logging" -) - -func main() { - sev := logging.ParseSeverity("ALERT") - fmt.Println(sev) -} - -// [END logging_generated_logging_ParseSeverity] diff --git a/internal/generated/snippets/logging/ToLogEntry/main.go b/internal/generated/snippets/logging/ToLogEntry/main.go deleted file mode 100644 index 6f80531d624..00000000000 --- a/internal/generated/snippets/logging/ToLogEntry/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_ToLogEntry] - -package main - -import ( - "context" - - "cloud.google.com/go/logging" - vkit "cloud.google.com/go/logging/apiv2" - logpb "google.golang.org/genproto/googleapis/logging/v2" -) - -func main() { - e := logging.Entry{ - Payload: "Message", - } - le, err := logging.ToLogEntry(e, "my-project") - if err != nil { - // TODO: Handle error. - } - client, err := vkit.NewClient(context.Background()) - if err != nil { - // TODO: Handle error. - } - _, err = client.WriteLogEntries(context.Background(), &logpb.WriteLogEntriesRequest{ - Entries: []*logpb.LogEntry{le}, - LogName: "stdout", - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_ToLogEntry] diff --git a/internal/generated/snippets/logging/apiv2/Client/DeleteLog/main.go b/internal/generated/snippets/logging/apiv2/Client/DeleteLog/main.go index 4530203a03c..8fbf6af7fbb 100644 --- a/internal/generated/snippets/logging/apiv2/Client/DeleteLog/main.go +++ b/internal/generated/snippets/logging/apiv2/Client/DeleteLog/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_Client_DeleteLog] +// [START logging_v2_generated_LoggingServiceV2_DeleteLog_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_Client_DeleteLog] +// [END logging_v2_generated_LoggingServiceV2_DeleteLog_sync] diff --git a/internal/generated/snippets/logging/apiv2/Client/ListLogEntries/main.go b/internal/generated/snippets/logging/apiv2/Client/ListLogEntries/main.go index 1be10132fbb..f81c3aa832e 100644 --- a/internal/generated/snippets/logging/apiv2/Client/ListLogEntries/main.go +++ b/internal/generated/snippets/logging/apiv2/Client/ListLogEntries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_Client_ListLogEntries] +// [START logging_v2_generated_LoggingServiceV2_ListLogEntries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_Client_ListLogEntries] +// [END logging_v2_generated_LoggingServiceV2_ListLogEntries_sync] diff --git a/internal/generated/snippets/logging/apiv2/Client/ListLogs/main.go b/internal/generated/snippets/logging/apiv2/Client/ListLogs/main.go index 4baf13d7893..205d1dc71ef 100644 --- a/internal/generated/snippets/logging/apiv2/Client/ListLogs/main.go +++ b/internal/generated/snippets/logging/apiv2/Client/ListLogs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_Client_ListLogs] +// [START logging_v2_generated_LoggingServiceV2_ListLogs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_Client_ListLogs] +// [END logging_v2_generated_LoggingServiceV2_ListLogs_sync] diff --git a/internal/generated/snippets/logging/apiv2/Client/ListMonitoredResourceDescriptors/main.go b/internal/generated/snippets/logging/apiv2/Client/ListMonitoredResourceDescriptors/main.go index f66c3f07139..d0ddc7c4f97 100644 --- a/internal/generated/snippets/logging/apiv2/Client/ListMonitoredResourceDescriptors/main.go +++ b/internal/generated/snippets/logging/apiv2/Client/ListMonitoredResourceDescriptors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_Client_ListMonitoredResourceDescriptors] +// [START logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_Client_ListMonitoredResourceDescriptors] +// [END logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_sync] diff --git a/internal/generated/snippets/logging/apiv2/Client/NewClient/main.go b/internal/generated/snippets/logging/apiv2/Client/NewClient/main.go deleted file mode 100644 index ba2c1508b06..00000000000 --- a/internal/generated/snippets/logging/apiv2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_apiv2_NewClient] - -package main - -import ( - "context" - - logging "cloud.google.com/go/logging/apiv2" -) - -func main() { - ctx := context.Background() - c, err := logging.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END logging_generated_logging_apiv2_NewClient] diff --git a/internal/generated/snippets/logging/apiv2/Client/TailLogEntries/main.go b/internal/generated/snippets/logging/apiv2/Client/TailLogEntries/main.go index 6b016ea0b0e..f3ea6fd335f 100644 --- a/internal/generated/snippets/logging/apiv2/Client/TailLogEntries/main.go +++ b/internal/generated/snippets/logging/apiv2/Client/TailLogEntries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_Client_TailLogEntries] +// [START logging_v2_generated_LoggingServiceV2_TailLogEntries_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_Client_TailLogEntries] +// [END logging_v2_generated_LoggingServiceV2_TailLogEntries_sync] diff --git a/internal/generated/snippets/logging/apiv2/Client/WriteLogEntries/main.go b/internal/generated/snippets/logging/apiv2/Client/WriteLogEntries/main.go index f572f75abad..814a06d931b 100644 --- a/internal/generated/snippets/logging/apiv2/Client/WriteLogEntries/main.go +++ b/internal/generated/snippets/logging/apiv2/Client/WriteLogEntries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_Client_WriteLogEntries] +// [START logging_v2_generated_LoggingServiceV2_WriteLogEntries_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_Client_WriteLogEntries] +// [END logging_v2_generated_LoggingServiceV2_WriteLogEntries_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateBucket/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateBucket/main.go index 9aecf76d6db..a37f0fcbfe8 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateBucket/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateBucket/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_CreateBucket] +// [START logging_v2_generated_ConfigServiceV2_CreateBucket_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_CreateBucket] +// [END logging_v2_generated_ConfigServiceV2_CreateBucket_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateExclusion/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateExclusion/main.go index 15656025beb..986d677ccb1 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateExclusion/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateExclusion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_CreateExclusion] +// [START logging_v2_generated_ConfigServiceV2_CreateExclusion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_CreateExclusion] +// [END logging_v2_generated_ConfigServiceV2_CreateExclusion_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateSink/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateSink/main.go index ab23ca5a136..2dd72e485fe 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateSink/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateSink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_CreateSink] +// [START logging_v2_generated_ConfigServiceV2_CreateSink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_CreateSink] +// [END logging_v2_generated_ConfigServiceV2_CreateSink_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateView/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateView/main.go index e2726fbfe78..f24e4e352f2 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/CreateView/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/CreateView/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_CreateView] +// [START logging_v2_generated_ConfigServiceV2_CreateView_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_CreateView] +// [END logging_v2_generated_ConfigServiceV2_CreateView_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteBucket/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteBucket/main.go index a9844dc8e18..4adef411858 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteBucket/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteBucket/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_DeleteBucket] +// [START logging_v2_generated_ConfigServiceV2_DeleteBucket_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_DeleteBucket] +// [END logging_v2_generated_ConfigServiceV2_DeleteBucket_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteExclusion/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteExclusion/main.go index f78f4622b5c..298c907f84f 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteExclusion/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteExclusion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_DeleteExclusion] +// [START logging_v2_generated_ConfigServiceV2_DeleteExclusion_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_DeleteExclusion] +// [END logging_v2_generated_ConfigServiceV2_DeleteExclusion_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteSink/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteSink/main.go index 65fc571be6c..f6cad54ac1c 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteSink/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteSink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_DeleteSink] +// [START logging_v2_generated_ConfigServiceV2_DeleteSink_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_DeleteSink] +// [END logging_v2_generated_ConfigServiceV2_DeleteSink_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteView/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteView/main.go index 5b75c82b288..6533fa76a49 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteView/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/DeleteView/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_DeleteView] +// [START logging_v2_generated_ConfigServiceV2_DeleteView_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_DeleteView] +// [END logging_v2_generated_ConfigServiceV2_DeleteView_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/GetBucket/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/GetBucket/main.go index 59a25a170ac..a71aaf682d1 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/GetBucket/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/GetBucket/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_GetBucket] +// [START logging_v2_generated_ConfigServiceV2_GetBucket_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_GetBucket] +// [END logging_v2_generated_ConfigServiceV2_GetBucket_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/GetCmekSettings/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/GetCmekSettings/main.go index 9be2d5b50f3..0ea0d51bbf8 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/GetCmekSettings/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/GetCmekSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_GetCmekSettings] +// [START logging_v2_generated_ConfigServiceV2_GetCmekSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_GetCmekSettings] +// [END logging_v2_generated_ConfigServiceV2_GetCmekSettings_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/GetExclusion/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/GetExclusion/main.go index be3d96e9bfc..fe09f9552dd 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/GetExclusion/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/GetExclusion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_GetExclusion] +// [START logging_v2_generated_ConfigServiceV2_GetExclusion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_GetExclusion] +// [END logging_v2_generated_ConfigServiceV2_GetExclusion_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/GetSink/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/GetSink/main.go index 3f6660eaa6d..190bde75dd6 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/GetSink/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/GetSink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_GetSink] +// [START logging_v2_generated_ConfigServiceV2_GetSink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_GetSink] +// [END logging_v2_generated_ConfigServiceV2_GetSink_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/GetView/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/GetView/main.go index eb8d456272f..58eab5560a7 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/GetView/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/GetView/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_GetView] +// [START logging_v2_generated_ConfigServiceV2_GetView_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_GetView] +// [END logging_v2_generated_ConfigServiceV2_GetView_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/ListBuckets/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/ListBuckets/main.go index 4e3877fc63e..b13064691f8 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/ListBuckets/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/ListBuckets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_ListBuckets] +// [START logging_v2_generated_ConfigServiceV2_ListBuckets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_ListBuckets] +// [END logging_v2_generated_ConfigServiceV2_ListBuckets_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/ListExclusions/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/ListExclusions/main.go index 7e6792705d8..dfa26a367ee 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/ListExclusions/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/ListExclusions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_ListExclusions] +// [START logging_v2_generated_ConfigServiceV2_ListExclusions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_ListExclusions] +// [END logging_v2_generated_ConfigServiceV2_ListExclusions_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/ListSinks/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/ListSinks/main.go index 9ca534788c6..e894c28870a 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/ListSinks/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/ListSinks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_ListSinks] +// [START logging_v2_generated_ConfigServiceV2_ListSinks_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_ListSinks] +// [END logging_v2_generated_ConfigServiceV2_ListSinks_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/ListViews/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/ListViews/main.go index 080fe95fbc5..894ac9ff133 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/ListViews/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/ListViews/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_ListViews] +// [START logging_v2_generated_ConfigServiceV2_ListViews_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_ListViews] +// [END logging_v2_generated_ConfigServiceV2_ListViews_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/NewConfigClient/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/NewConfigClient/main.go deleted file mode 100644 index 231d3a6a905..00000000000 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/NewConfigClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_apiv2_NewConfigClient] - -package main - -import ( - "context" - - logging "cloud.google.com/go/logging/apiv2" -) - -func main() { - ctx := context.Background() - c, err := logging.NewConfigClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END logging_generated_logging_apiv2_NewConfigClient] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/UndeleteBucket/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/UndeleteBucket/main.go index 65746f6c958..29e190f79e4 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/UndeleteBucket/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/UndeleteBucket/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_UndeleteBucket] +// [START logging_v2_generated_ConfigServiceV2_UndeleteBucket_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_ConfigClient_UndeleteBucket] +// [END logging_v2_generated_ConfigServiceV2_UndeleteBucket_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateBucket/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateBucket/main.go index 4838a457223..bb6447754e0 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateBucket/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateBucket/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_UpdateBucket] +// [START logging_v2_generated_ConfigServiceV2_UpdateBucket_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_UpdateBucket] +// [END logging_v2_generated_ConfigServiceV2_UpdateBucket_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateCmekSettings/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateCmekSettings/main.go index 1b14ff3e2ae..b1454b87627 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateCmekSettings/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateCmekSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_UpdateCmekSettings] +// [START logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_UpdateCmekSettings] +// [END logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateExclusion/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateExclusion/main.go index 6c246dc35ba..da9753c0929 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateExclusion/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateExclusion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_UpdateExclusion] +// [START logging_v2_generated_ConfigServiceV2_UpdateExclusion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_UpdateExclusion] +// [END logging_v2_generated_ConfigServiceV2_UpdateExclusion_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateSink/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateSink/main.go index a6e76efffde..feec3efa39e 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateSink/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateSink/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_UpdateSink] +// [START logging_v2_generated_ConfigServiceV2_UpdateSink_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_UpdateSink] +// [END logging_v2_generated_ConfigServiceV2_UpdateSink_sync] diff --git a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateView/main.go b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateView/main.go index 3d2220ae770..2e0b3ccda0b 100644 --- a/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateView/main.go +++ b/internal/generated/snippets/logging/apiv2/ConfigClient/UpdateView/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_ConfigClient_UpdateView] +// [START logging_v2_generated_ConfigServiceV2_UpdateView_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_ConfigClient_UpdateView] +// [END logging_v2_generated_ConfigServiceV2_UpdateView_sync] diff --git a/internal/generated/snippets/logging/apiv2/MetricsClient/CreateLogMetric/main.go b/internal/generated/snippets/logging/apiv2/MetricsClient/CreateLogMetric/main.go index a10b76a7dc5..c3c376f6d88 100644 --- a/internal/generated/snippets/logging/apiv2/MetricsClient/CreateLogMetric/main.go +++ b/internal/generated/snippets/logging/apiv2/MetricsClient/CreateLogMetric/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_MetricsClient_CreateLogMetric] +// [START logging_v2_generated_MetricsServiceV2_CreateLogMetric_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_MetricsClient_CreateLogMetric] +// [END logging_v2_generated_MetricsServiceV2_CreateLogMetric_sync] diff --git a/internal/generated/snippets/logging/apiv2/MetricsClient/DeleteLogMetric/main.go b/internal/generated/snippets/logging/apiv2/MetricsClient/DeleteLogMetric/main.go index 8be65f1b731..98ae2485996 100644 --- a/internal/generated/snippets/logging/apiv2/MetricsClient/DeleteLogMetric/main.go +++ b/internal/generated/snippets/logging/apiv2/MetricsClient/DeleteLogMetric/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_MetricsClient_DeleteLogMetric] +// [START logging_v2_generated_MetricsServiceV2_DeleteLogMetric_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_MetricsClient_DeleteLogMetric] +// [END logging_v2_generated_MetricsServiceV2_DeleteLogMetric_sync] diff --git a/internal/generated/snippets/logging/apiv2/MetricsClient/GetLogMetric/main.go b/internal/generated/snippets/logging/apiv2/MetricsClient/GetLogMetric/main.go index df77579f960..8dedc920838 100644 --- a/internal/generated/snippets/logging/apiv2/MetricsClient/GetLogMetric/main.go +++ b/internal/generated/snippets/logging/apiv2/MetricsClient/GetLogMetric/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_MetricsClient_GetLogMetric] +// [START logging_v2_generated_MetricsServiceV2_GetLogMetric_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_MetricsClient_GetLogMetric] +// [END logging_v2_generated_MetricsServiceV2_GetLogMetric_sync] diff --git a/internal/generated/snippets/logging/apiv2/MetricsClient/ListLogMetrics/main.go b/internal/generated/snippets/logging/apiv2/MetricsClient/ListLogMetrics/main.go index efacb225aaf..b6f1e527857 100644 --- a/internal/generated/snippets/logging/apiv2/MetricsClient/ListLogMetrics/main.go +++ b/internal/generated/snippets/logging/apiv2/MetricsClient/ListLogMetrics/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_MetricsClient_ListLogMetrics] +// [START logging_v2_generated_MetricsServiceV2_ListLogMetrics_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END logging_generated_logging_apiv2_MetricsClient_ListLogMetrics] +// [END logging_v2_generated_MetricsServiceV2_ListLogMetrics_sync] diff --git a/internal/generated/snippets/logging/apiv2/MetricsClient/NewMetricsClient/main.go b/internal/generated/snippets/logging/apiv2/MetricsClient/NewMetricsClient/main.go deleted file mode 100644 index a45381beaee..00000000000 --- a/internal/generated/snippets/logging/apiv2/MetricsClient/NewMetricsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_apiv2_NewMetricsClient] - -package main - -import ( - "context" - - logging "cloud.google.com/go/logging/apiv2" -) - -func main() { - ctx := context.Background() - c, err := logging.NewMetricsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END logging_generated_logging_apiv2_NewMetricsClient] diff --git a/internal/generated/snippets/logging/apiv2/MetricsClient/UpdateLogMetric/main.go b/internal/generated/snippets/logging/apiv2/MetricsClient/UpdateLogMetric/main.go index aeb57b7ff6a..10144f4c996 100644 --- a/internal/generated/snippets/logging/apiv2/MetricsClient/UpdateLogMetric/main.go +++ b/internal/generated/snippets/logging/apiv2/MetricsClient/UpdateLogMetric/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START logging_generated_logging_apiv2_MetricsClient_UpdateLogMetric] +// [START logging_v2_generated_MetricsServiceV2_UpdateLogMetric_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END logging_generated_logging_apiv2_MetricsClient_UpdateLogMetric] +// [END logging_v2_generated_MetricsServiceV2_UpdateLogMetric_sync] diff --git a/internal/generated/snippets/logging/logadmin/Client/CreateMetric/main.go b/internal/generated/snippets/logging/logadmin/Client/CreateMetric/main.go deleted file mode 100644 index 9caec2322d9..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/CreateMetric/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_CreateMetric] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - err = client.CreateMetric(ctx, &logadmin.Metric{ - ID: "severe-errors", - Description: "entries at ERROR or higher severities", - Filter: "severity >= ERROR", - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_logadmin_Client_CreateMetric] diff --git a/internal/generated/snippets/logging/logadmin/Client/CreateSink/main.go b/internal/generated/snippets/logging/logadmin/Client/CreateSink/main.go deleted file mode 100644 index 6e035298043..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/CreateSink/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_CreateSink] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - sink, err := client.CreateSink(ctx, &logadmin.Sink{ - ID: "severe-errors-to-gcs", - Destination: "storage.googleapis.com/my-bucket", - Filter: "severity >= ERROR", - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(sink) -} - -// [END logging_generated_logging_logadmin_Client_CreateSink] diff --git a/internal/generated/snippets/logging/logadmin/Client/DeleteLog/main.go b/internal/generated/snippets/logging/logadmin/Client/DeleteLog/main.go deleted file mode 100644 index 1533780baf4..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/DeleteLog/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_DeleteLog] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - err = client.DeleteLog(ctx, "my-log") - if err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_logadmin_Client_DeleteLog] diff --git a/internal/generated/snippets/logging/logadmin/Client/DeleteMetric/main.go b/internal/generated/snippets/logging/logadmin/Client/DeleteMetric/main.go deleted file mode 100644 index dfc8b1c63a8..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/DeleteMetric/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_DeleteMetric] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - if err := client.DeleteMetric(ctx, "severe-errors"); err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_logadmin_Client_DeleteMetric] diff --git a/internal/generated/snippets/logging/logadmin/Client/DeleteSink/main.go b/internal/generated/snippets/logging/logadmin/Client/DeleteSink/main.go deleted file mode 100644 index 79a4a640238..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/DeleteSink/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_DeleteSink] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - if err := client.DeleteSink(ctx, "severe-errors-to-gcs"); err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_logadmin_Client_DeleteSink] diff --git a/internal/generated/snippets/logging/logadmin/Client/Entries/main.go b/internal/generated/snippets/logging/logadmin/Client/Entries/main.go deleted file mode 100644 index 421319874db..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/Entries/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_Entries] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.Entries(ctx, logadmin.Filter(`logName = "projects/my-project/logs/my-log"`)) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END logging_generated_logging_logadmin_Client_Entries] diff --git a/internal/generated/snippets/logging/logadmin/Client/Entries/pagination/main.go b/internal/generated/snippets/logging/logadmin/Client/Entries/pagination/main.go deleted file mode 100644 index b6b1036f7e1..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/Entries/pagination/main.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_Entries_pagination] - -package main - -import ( - "bytes" - "context" - "flag" - "fmt" - "html/template" - "log" - "net/http" - - "cloud.google.com/go/logging" - "cloud.google.com/go/logging/logadmin" - "google.golang.org/api/iterator" -) - -var ( - client *logadmin.Client - projectID = flag.String("project-id", "", "ID of the project to use") -) - -func main() { - // This example demonstrates how to iterate through items a page at a time - // even if each successive page is fetched by a different process. It is a - // complete web server that displays pages of log entries. To run it as a - // standalone program, rename both the package and this function to "main". - ctx := context.Background() - flag.Parse() - if *projectID == "" { - log.Fatal("-project-id missing") - } - var err error - client, err = logadmin.NewClient(ctx, *projectID) - if err != nil { - log.Fatalf("creating logging client: %v", err) - } - - http.HandleFunc("/entries", handleEntries) - log.Print("listening on 8080") - log.Fatal(http.ListenAndServe(":8080", nil)) -} - -var pageTemplate = template.Must(template.New("").Parse(` - - {{range .Entries}} - - {{end}} -
{{.}}
-{{if .Next}} - Next Page -{{end}} -`)) - -func handleEntries(w http.ResponseWriter, r *http.Request) { - ctx := context.Background() - filter := fmt.Sprintf(`logName = "projects/%s/logs/testlog"`, *projectID) - it := client.Entries(ctx, logadmin.Filter(filter)) - var entries []*logging.Entry - nextTok, err := iterator.NewPager(it, 5, r.URL.Query().Get("pageToken")).NextPage(&entries) - if err != nil { - http.Error(w, fmt.Sprintf("problem getting the next page: %v", err), http.StatusInternalServerError) - return - } - data := struct { - Entries []*logging.Entry - Next string - }{ - entries, - nextTok, - } - var buf bytes.Buffer - if err := pageTemplate.Execute(&buf, data); err != nil { - http.Error(w, fmt.Sprintf("problem executing page template: %v", err), http.StatusInternalServerError) - } - if _, err := buf.WriteTo(w); err != nil { - log.Printf("writing response: %v", err) - } -} - -// [END logging_generated_logging_logadmin_Client_Entries_pagination] diff --git a/internal/generated/snippets/logging/logadmin/Client/Metric/main.go b/internal/generated/snippets/logging/logadmin/Client/Metric/main.go deleted file mode 100644 index eb047d4bf7d..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/Metric/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_Metric] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - m, err := client.Metric(ctx, "severe-errors") - if err != nil { - // TODO: Handle error. - } - fmt.Println(m) -} - -// [END logging_generated_logging_logadmin_Client_Metric] diff --git a/internal/generated/snippets/logging/logadmin/Client/Metrics/main.go b/internal/generated/snippets/logging/logadmin/Client/Metrics/main.go deleted file mode 100644 index 3a76c91dabc..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/Metrics/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_Metrics] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.Metrics(ctx) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END logging_generated_logging_logadmin_Client_Metrics] diff --git a/internal/generated/snippets/logging/logadmin/Client/NewClient/main.go b/internal/generated/snippets/logging/logadmin/Client/NewClient/main.go deleted file mode 100644 index 02b4ec226c3..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/NewClient/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - // Use client to manage logs, metrics and sinks. - // Close the client when finished. - if err := client.Close(); err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_logadmin_NewClient] diff --git a/internal/generated/snippets/logging/logadmin/Client/ResourceDescriptors/main.go b/internal/generated/snippets/logging/logadmin/Client/ResourceDescriptors/main.go deleted file mode 100644 index c013a020567..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/ResourceDescriptors/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_ResourceDescriptors] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.ResourceDescriptors(ctx) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END logging_generated_logging_logadmin_Client_ResourceDescriptors] diff --git a/internal/generated/snippets/logging/logadmin/Client/Sink/main.go b/internal/generated/snippets/logging/logadmin/Client/Sink/main.go deleted file mode 100644 index dab3749e816..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/Sink/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_Sink] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - s, err := client.Sink(ctx, "severe-errors-to-gcs") - if err != nil { - // TODO: Handle error. - } - fmt.Println(s) -} - -// [END logging_generated_logging_logadmin_Client_Sink] diff --git a/internal/generated/snippets/logging/logadmin/Client/Sinks/main.go b/internal/generated/snippets/logging/logadmin/Client/Sinks/main.go deleted file mode 100644 index 84b4b0c3c55..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/Sinks/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_Sinks] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.Sinks(ctx) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END logging_generated_logging_logadmin_Client_Sinks] diff --git a/internal/generated/snippets/logging/logadmin/Client/UpdateMetric/main.go b/internal/generated/snippets/logging/logadmin/Client/UpdateMetric/main.go deleted file mode 100644 index a3b60432194..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/UpdateMetric/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_UpdateMetric] - -package main - -import ( - "context" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - err = client.UpdateMetric(ctx, &logadmin.Metric{ - ID: "severe-errors", - Description: "entries at high severities", - Filter: "severity > ERROR", - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END logging_generated_logging_logadmin_Client_UpdateMetric] diff --git a/internal/generated/snippets/logging/logadmin/Client/UpdateSink/main.go b/internal/generated/snippets/logging/logadmin/Client/UpdateSink/main.go deleted file mode 100644 index 5d959b62f01..00000000000 --- a/internal/generated/snippets/logging/logadmin/Client/UpdateSink/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Client_UpdateSink] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - sink, err := client.UpdateSink(ctx, &logadmin.Sink{ - ID: "severe-errors-to-gcs", - Destination: "storage.googleapis.com/my-other-bucket", - Filter: "severity >= ERROR", - }) - if err != nil { - // TODO: Handle error. - } - fmt.Println(sink) -} - -// [END logging_generated_logging_logadmin_Client_UpdateSink] diff --git a/internal/generated/snippets/logging/logadmin/EntriesOption/Filter/main.go b/internal/generated/snippets/logging/logadmin/EntriesOption/Filter/main.go deleted file mode 100644 index c86562ff5f3..00000000000 --- a/internal/generated/snippets/logging/logadmin/EntriesOption/Filter/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_Filter_timestamp] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/logging/logadmin" -) - -func main() { - // This example demonstrates how to list the last 24 hours of log entries. - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - oneDayAgo := time.Now().Add(-24 * time.Hour) - t := oneDayAgo.Format(time.RFC3339) // Logging API wants timestamps in RFC 3339 format. - it := client.Entries(ctx, logadmin.Filter(fmt.Sprintf(`timestamp > "%s"`, t))) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END logging_generated_logging_logadmin_Filter_timestamp] diff --git a/internal/generated/snippets/logging/logadmin/EntryIterator/Next/main.go b/internal/generated/snippets/logging/logadmin/EntryIterator/Next/main.go deleted file mode 100644 index 1c8e91fa094..00000000000 --- a/internal/generated/snippets/logging/logadmin/EntryIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_EntryIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.Entries(ctx) - for { - entry, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(entry) - } -} - -// [END logging_generated_logging_logadmin_EntryIterator_Next] diff --git a/internal/generated/snippets/logging/logadmin/MetricIterator/Next/main.go b/internal/generated/snippets/logging/logadmin/MetricIterator/Next/main.go deleted file mode 100644 index b98e86d39bb..00000000000 --- a/internal/generated/snippets/logging/logadmin/MetricIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_MetricIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.Metrics(ctx) - for { - metric, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(metric) - } -} - -// [END logging_generated_logging_logadmin_MetricIterator_Next] diff --git a/internal/generated/snippets/logging/logadmin/ResourceDescriptorIterator/Next/main.go b/internal/generated/snippets/logging/logadmin/ResourceDescriptorIterator/Next/main.go deleted file mode 100644 index 5bea6b7e6e0..00000000000 --- a/internal/generated/snippets/logging/logadmin/ResourceDescriptorIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_ResourceDescriptorIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.ResourceDescriptors(ctx) - for { - rdesc, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(rdesc) - } -} - -// [END logging_generated_logging_logadmin_ResourceDescriptorIterator_Next] diff --git a/internal/generated/snippets/logging/logadmin/SinkIterator/Next/main.go b/internal/generated/snippets/logging/logadmin/SinkIterator/Next/main.go deleted file mode 100644 index 18e71ca75f6..00000000000 --- a/internal/generated/snippets/logging/logadmin/SinkIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START logging_generated_logging_logadmin_SinkIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/logging/logadmin" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := logadmin.NewClient(ctx, "my-project") - if err != nil { - // TODO: Handle error. - } - it := client.Sinks(ctx) - for { - sink, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(sink) - } -} - -// [END logging_generated_logging_logadmin_SinkIterator_Next] diff --git a/internal/generated/snippets/longrunning/autogen/OperationsClient/CancelOperation/main.go b/internal/generated/snippets/longrunning/autogen/OperationsClient/CancelOperation/main.go index a9bf0bd447a..32f373b53b2 100644 --- a/internal/generated/snippets/longrunning/autogen/OperationsClient/CancelOperation/main.go +++ b/internal/generated/snippets/longrunning/autogen/OperationsClient/CancelOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START longrunning_generated_longrunning_autogen_OperationsClient_CancelOperation] +// [START longrunning_longrunning_generated_Operations_CancelOperation_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END longrunning_generated_longrunning_autogen_OperationsClient_CancelOperation] +// [END longrunning_longrunning_generated_Operations_CancelOperation_sync] diff --git a/internal/generated/snippets/longrunning/autogen/OperationsClient/DeleteOperation/main.go b/internal/generated/snippets/longrunning/autogen/OperationsClient/DeleteOperation/main.go index 1c9c8c947eb..2dc6f811e95 100644 --- a/internal/generated/snippets/longrunning/autogen/OperationsClient/DeleteOperation/main.go +++ b/internal/generated/snippets/longrunning/autogen/OperationsClient/DeleteOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START longrunning_generated_longrunning_autogen_OperationsClient_DeleteOperation] +// [START longrunning_longrunning_generated_Operations_DeleteOperation_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END longrunning_generated_longrunning_autogen_OperationsClient_DeleteOperation] +// [END longrunning_longrunning_generated_Operations_DeleteOperation_sync] diff --git a/internal/generated/snippets/longrunning/autogen/OperationsClient/GetOperation/main.go b/internal/generated/snippets/longrunning/autogen/OperationsClient/GetOperation/main.go index 96b30ae72be..7b730556b37 100644 --- a/internal/generated/snippets/longrunning/autogen/OperationsClient/GetOperation/main.go +++ b/internal/generated/snippets/longrunning/autogen/OperationsClient/GetOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START longrunning_generated_longrunning_autogen_OperationsClient_GetOperation] +// [START longrunning_longrunning_generated_Operations_GetOperation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END longrunning_generated_longrunning_autogen_OperationsClient_GetOperation] +// [END longrunning_longrunning_generated_Operations_GetOperation_sync] diff --git a/internal/generated/snippets/longrunning/autogen/OperationsClient/ListOperations/main.go b/internal/generated/snippets/longrunning/autogen/OperationsClient/ListOperations/main.go index 9d7d019415c..ae8e986e7e7 100644 --- a/internal/generated/snippets/longrunning/autogen/OperationsClient/ListOperations/main.go +++ b/internal/generated/snippets/longrunning/autogen/OperationsClient/ListOperations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START longrunning_generated_longrunning_autogen_OperationsClient_ListOperations] +// [START longrunning_longrunning_generated_Operations_ListOperations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END longrunning_generated_longrunning_autogen_OperationsClient_ListOperations] +// [END longrunning_longrunning_generated_Operations_ListOperations_sync] diff --git a/internal/generated/snippets/longrunning/autogen/OperationsClient/NewOperationsClient/main.go b/internal/generated/snippets/longrunning/autogen/OperationsClient/NewOperationsClient/main.go deleted file mode 100644 index f121bc3c5e8..00000000000 --- a/internal/generated/snippets/longrunning/autogen/OperationsClient/NewOperationsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START longrunning_generated_longrunning_autogen_NewOperationsClient] - -package main - -import ( - "context" - - longrunning "cloud.google.com/go/longrunning/autogen" -) - -func main() { - ctx := context.Background() - c, err := longrunning.NewOperationsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END longrunning_generated_longrunning_autogen_NewOperationsClient] diff --git a/internal/generated/snippets/longrunning/autogen/OperationsClient/WaitOperation/main.go b/internal/generated/snippets/longrunning/autogen/OperationsClient/WaitOperation/main.go index ae5ff862340..347845df3f3 100644 --- a/internal/generated/snippets/longrunning/autogen/OperationsClient/WaitOperation/main.go +++ b/internal/generated/snippets/longrunning/autogen/OperationsClient/WaitOperation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START longrunning_generated_longrunning_autogen_OperationsClient_WaitOperation] +// [START longrunning_longrunning_generated_Operations_WaitOperation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END longrunning_generated_longrunning_autogen_OperationsClient_WaitOperation] +// [END longrunning_longrunning_generated_Operations_WaitOperation_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/AttachTrust/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/AttachTrust/main.go index a64df12df34..dd634a4a3d8 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/AttachTrust/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/AttachTrust/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_AttachTrust] +// [START managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_AttachTrust] +// [END managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/CreateMicrosoftAdDomain/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/CreateMicrosoftAdDomain/main.go index fec7eab50b2..46819b0044c 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/CreateMicrosoftAdDomain/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/CreateMicrosoftAdDomain/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_CreateMicrosoftAdDomain] +// [START managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_CreateMicrosoftAdDomain] +// [END managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/DeleteDomain/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/DeleteDomain/main.go index 1cacf33b03a..583bf413a2e 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/DeleteDomain/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/DeleteDomain/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_DeleteDomain] +// [START managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END managedidentities_generated_managedidentities_apiv1_Client_DeleteDomain] +// [END managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/DetachTrust/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/DetachTrust/main.go index f61729adddf..0b16698f15b 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/DetachTrust/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/DetachTrust/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_DetachTrust] +// [START managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_DetachTrust] +// [END managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/GetDomain/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/GetDomain/main.go index e849cfb5152..8a4c1193e4d 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/GetDomain/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/GetDomain/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_GetDomain] +// [START managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_GetDomain] +// [END managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/ListDomains/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/ListDomains/main.go index f4fb1de637a..eff63b84a85 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/ListDomains/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/ListDomains/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_ListDomains] +// [START managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END managedidentities_generated_managedidentities_apiv1_Client_ListDomains] +// [END managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/NewClient/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/NewClient/main.go deleted file mode 100644 index f91ee331b07..00000000000 --- a/internal/generated/snippets/managedidentities/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START managedidentities_generated_managedidentities_apiv1_NewClient] - -package main - -import ( - "context" - - managedidentities "cloud.google.com/go/managedidentities/apiv1" -) - -func main() { - ctx := context.Background() - c, err := managedidentities.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END managedidentities_generated_managedidentities_apiv1_NewClient] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/ReconfigureTrust/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/ReconfigureTrust/main.go index ab1ce589c97..856db305dc4 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/ReconfigureTrust/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/ReconfigureTrust/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_ReconfigureTrust] +// [START managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_ReconfigureTrust] +// [END managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/ResetAdminPassword/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/ResetAdminPassword/main.go index 804fd6cf23d..4ff9d3c297b 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/ResetAdminPassword/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/ResetAdminPassword/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_ResetAdminPassword] +// [START managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_ResetAdminPassword] +// [END managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/UpdateDomain/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/UpdateDomain/main.go index 37a4aad78cd..5920b41ac4c 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/UpdateDomain/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/UpdateDomain/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_UpdateDomain] +// [START managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_UpdateDomain] +// [END managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_sync] diff --git a/internal/generated/snippets/managedidentities/apiv1/Client/ValidateTrust/main.go b/internal/generated/snippets/managedidentities/apiv1/Client/ValidateTrust/main.go index ec0a4a3cc36..0d14eb8b053 100644 --- a/internal/generated/snippets/managedidentities/apiv1/Client/ValidateTrust/main.go +++ b/internal/generated/snippets/managedidentities/apiv1/Client/ValidateTrust/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START managedidentities_generated_managedidentities_apiv1_Client_ValidateTrust] +// [START managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END managedidentities_generated_managedidentities_apiv1_Client_ValidateTrust] +// [END managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_sync] diff --git a/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/NewSpeechTranslationClient/main.go b/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/NewSpeechTranslationClient/main.go deleted file mode 100644 index e3655e39250..00000000000 --- a/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/NewSpeechTranslationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START mediatranslation_generated_mediatranslation_apiv1beta1_NewSpeechTranslationClient] - -package main - -import ( - "context" - - mediatranslation "cloud.google.com/go/mediatranslation/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := mediatranslation.NewSpeechTranslationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END mediatranslation_generated_mediatranslation_apiv1beta1_NewSpeechTranslationClient] diff --git a/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/StreamingTranslateSpeech/main.go b/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/StreamingTranslateSpeech/main.go index ee629c551c7..7ea7392ebb4 100644 --- a/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/StreamingTranslateSpeech/main.go +++ b/internal/generated/snippets/mediatranslation/apiv1beta1/SpeechTranslationClient/StreamingTranslateSpeech/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START mediatranslation_generated_mediatranslation_apiv1beta1_SpeechTranslationClient_StreamingTranslateSpeech] +// [START mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END mediatranslation_generated_mediatranslation_apiv1beta1_SpeechTranslationClient_StreamingTranslateSpeech] +// [END mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ApplyParameters/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ApplyParameters/main.go index 2b4b368b40c..bf80554c5c5 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ApplyParameters/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ApplyParameters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_ApplyParameters] +// [START memcache_v1_generated_CloudMemcache_ApplyParameters_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_ApplyParameters] +// [END memcache_v1_generated_CloudMemcache_ApplyParameters_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/CreateInstance/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/CreateInstance/main.go index ec24a3e2026..0aa5c3e07d6 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/CreateInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/CreateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_CreateInstance] +// [START memcache_v1_generated_CloudMemcache_CreateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_CreateInstance] +// [END memcache_v1_generated_CloudMemcache_CreateInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/DeleteInstance/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/DeleteInstance/main.go index 26365193da9..9786a68ff5d 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/DeleteInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_DeleteInstance] +// [START memcache_v1_generated_CloudMemcache_DeleteInstance_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_DeleteInstance] +// [END memcache_v1_generated_CloudMemcache_DeleteInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/GetInstance/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/GetInstance/main.go index 992f54506c8..5b1e0191fa9 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/GetInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_GetInstance] +// [START memcache_v1_generated_CloudMemcache_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_GetInstance] +// [END memcache_v1_generated_CloudMemcache_GetInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ListInstances/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ListInstances/main.go index a93f98aa8ee..3fe93a20bad 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ListInstances/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_ListInstances] +// [START memcache_v1_generated_CloudMemcache_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_ListInstances] +// [END memcache_v1_generated_CloudMemcache_ListInstances_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/NewCloudMemcacheClient/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/NewCloudMemcacheClient/main.go deleted file mode 100644 index 1d879d20287..00000000000 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/NewCloudMemcacheClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START memcache_generated_memcache_apiv1_NewCloudMemcacheClient] - -package main - -import ( - "context" - - memcache "cloud.google.com/go/memcache/apiv1" -) - -func main() { - ctx := context.Background() - c, err := memcache.NewCloudMemcacheClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END memcache_generated_memcache_apiv1_NewCloudMemcacheClient] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateInstance/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateInstance/main.go index 05978983079..a6211ec116e 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_UpdateInstance] +// [START memcache_v1_generated_CloudMemcache_UpdateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_UpdateInstance] +// [END memcache_v1_generated_CloudMemcache_UpdateInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateParameters/main.go b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateParameters/main.go index b92d3dde954..2a4b71242c5 100644 --- a/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateParameters/main.go +++ b/internal/generated/snippets/memcache/apiv1/CloudMemcacheClient/UpdateParameters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1_CloudMemcacheClient_UpdateParameters] +// [START memcache_v1_generated_CloudMemcache_UpdateParameters_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1_CloudMemcacheClient_UpdateParameters] +// [END memcache_v1_generated_CloudMemcache_UpdateParameters_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplyParameters/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplyParameters/main.go index b6c4433d4c7..3b34f2aafac 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplyParameters/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplyParameters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_ApplyParameters] +// [START memcache_v1beta2_generated_CloudMemcache_ApplyParameters_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_ApplyParameters] +// [END memcache_v1beta2_generated_CloudMemcache_ApplyParameters_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplySoftwareUpdate/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplySoftwareUpdate/main.go index 665caa64e40..17235309968 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplySoftwareUpdate/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ApplySoftwareUpdate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_ApplySoftwareUpdate] +// [START memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_ApplySoftwareUpdate] +// [END memcache_v1beta2_generated_CloudMemcache_ApplySoftwareUpdate_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/CreateInstance/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/CreateInstance/main.go index b471af4a56c..0d5afd80fb5 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/CreateInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/CreateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_CreateInstance] +// [START memcache_v1beta2_generated_CloudMemcache_CreateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_CreateInstance] +// [END memcache_v1beta2_generated_CloudMemcache_CreateInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/DeleteInstance/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/DeleteInstance/main.go index c29777daed7..1cb3d3c77b2 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/DeleteInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_DeleteInstance] +// [START memcache_v1beta2_generated_CloudMemcache_DeleteInstance_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_DeleteInstance] +// [END memcache_v1beta2_generated_CloudMemcache_DeleteInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/GetInstance/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/GetInstance/main.go index 50377a5e934..3035712efcd 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/GetInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_GetInstance] +// [START memcache_v1beta2_generated_CloudMemcache_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_GetInstance] +// [END memcache_v1beta2_generated_CloudMemcache_GetInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ListInstances/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ListInstances/main.go index 0fb77f96332..ee03d778308 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ListInstances/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_ListInstances] +// [START memcache_v1beta2_generated_CloudMemcache_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_ListInstances] +// [END memcache_v1beta2_generated_CloudMemcache_ListInstances_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/NewCloudMemcacheClient/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/NewCloudMemcacheClient/main.go deleted file mode 100644 index 1174c1cde72..00000000000 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/NewCloudMemcacheClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START memcache_generated_memcache_apiv1beta2_NewCloudMemcacheClient] - -package main - -import ( - "context" - - memcache "cloud.google.com/go/memcache/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := memcache.NewCloudMemcacheClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END memcache_generated_memcache_apiv1beta2_NewCloudMemcacheClient] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateInstance/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateInstance/main.go index 14c21cf655a..6e1b7852bd6 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateInstance/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_UpdateInstance] +// [START memcache_v1beta2_generated_CloudMemcache_UpdateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_UpdateInstance] +// [END memcache_v1beta2_generated_CloudMemcache_UpdateInstance_sync] diff --git a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateParameters/main.go b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateParameters/main.go index 7f505b0b030..b3ce1665df4 100644 --- a/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateParameters/main.go +++ b/internal/generated/snippets/memcache/apiv1beta2/CloudMemcacheClient/UpdateParameters/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_UpdateParameters] +// [START memcache_v1beta2_generated_CloudMemcache_UpdateParameters_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END memcache_generated_memcache_apiv1beta2_CloudMemcacheClient_UpdateParameters] +// [END memcache_v1beta2_generated_CloudMemcache_UpdateParameters_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateBackup/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateBackup/main.go index ad2b003169d..c7c46085b0e 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateBackup/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_CreateBackup] +// [START metastore_v1alpha_generated_DataprocMetastore_CreateBackup_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_CreateBackup] +// [END metastore_v1alpha_generated_DataprocMetastore_CreateBackup_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateMetadataImport/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateMetadataImport/main.go index a872bf1ad02..4ae0d23bf1c 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateMetadataImport/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateMetadataImport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_CreateMetadataImport] +// [START metastore_v1alpha_generated_DataprocMetastore_CreateMetadataImport_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_CreateMetadataImport] +// [END metastore_v1alpha_generated_DataprocMetastore_CreateMetadataImport_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateService/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateService/main.go index 98d46d5cf24..38c30595184 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateService/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/CreateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_CreateService] +// [START metastore_v1alpha_generated_DataprocMetastore_CreateService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_CreateService] +// [END metastore_v1alpha_generated_DataprocMetastore_CreateService_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteBackup/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteBackup/main.go index f5de13db305..41e2c528f0b 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteBackup/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_DeleteBackup] +// [START metastore_v1alpha_generated_DataprocMetastore_DeleteBackup_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_DeleteBackup] +// [END metastore_v1alpha_generated_DataprocMetastore_DeleteBackup_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteService/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteService/main.go index 302854712d8..74f6e9f5efd 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteService/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_DeleteService] +// [START metastore_v1alpha_generated_DataprocMetastore_DeleteService_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_DeleteService] +// [END metastore_v1alpha_generated_DataprocMetastore_DeleteService_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ExportMetadata/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ExportMetadata/main.go index 9cf402ced63..69f5e3ce5b2 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ExportMetadata/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ExportMetadata/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ExportMetadata] +// [START metastore_v1alpha_generated_DataprocMetastore_ExportMetadata_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ExportMetadata] +// [END metastore_v1alpha_generated_DataprocMetastore_ExportMetadata_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetBackup/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetBackup/main.go index 2806933c15c..c8af4eaa49f 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetBackup/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_GetBackup] +// [START metastore_v1alpha_generated_DataprocMetastore_GetBackup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_GetBackup] +// [END metastore_v1alpha_generated_DataprocMetastore_GetBackup_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetMetadataImport/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetMetadataImport/main.go index 9dddb8614a7..81d8da6b00a 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetMetadataImport/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetMetadataImport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_GetMetadataImport] +// [START metastore_v1alpha_generated_DataprocMetastore_GetMetadataImport_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_GetMetadataImport] +// [END metastore_v1alpha_generated_DataprocMetastore_GetMetadataImport_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetService/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetService/main.go index 0e1e2363327..423cb293f30 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetService/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_GetService] +// [START metastore_v1alpha_generated_DataprocMetastore_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_GetService] +// [END metastore_v1alpha_generated_DataprocMetastore_GetService_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListBackups/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListBackups/main.go index b9532513dd9..7afe49b4e6e 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListBackups/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListBackups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ListBackups] +// [START metastore_v1alpha_generated_DataprocMetastore_ListBackups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ListBackups] +// [END metastore_v1alpha_generated_DataprocMetastore_ListBackups_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListMetadataImports/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListMetadataImports/main.go index 0892bf2ce03..378418d65a9 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListMetadataImports/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListMetadataImports/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ListMetadataImports] +// [START metastore_v1alpha_generated_DataprocMetastore_ListMetadataImports_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ListMetadataImports] +// [END metastore_v1alpha_generated_DataprocMetastore_ListMetadataImports_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListServices/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListServices/main.go index 22fe4e6e8f7..a655d3b3ed4 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListServices/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ListServices] +// [START metastore_v1alpha_generated_DataprocMetastore_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_ListServices] +// [END metastore_v1alpha_generated_DataprocMetastore_ListServices_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/NewDataprocMetastoreClient/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/NewDataprocMetastoreClient/main.go deleted file mode 100644 index 438629be77e..00000000000 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/NewDataprocMetastoreClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START metastore_generated_metastore_apiv1alpha_NewDataprocMetastoreClient] - -package main - -import ( - "context" - - metastore "cloud.google.com/go/metastore/apiv1alpha" -) - -func main() { - ctx := context.Background() - c, err := metastore.NewDataprocMetastoreClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END metastore_generated_metastore_apiv1alpha_NewDataprocMetastoreClient] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/RestoreService/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/RestoreService/main.go index 11f463fb840..a9f6f12ba8c 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/RestoreService/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/RestoreService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_RestoreService] +// [START metastore_v1alpha_generated_DataprocMetastore_RestoreService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_RestoreService] +// [END metastore_v1alpha_generated_DataprocMetastore_RestoreService_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateMetadataImport/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateMetadataImport/main.go index 3a93597d3a0..e351a37f1c7 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateMetadataImport/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateMetadataImport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_UpdateMetadataImport] +// [START metastore_v1alpha_generated_DataprocMetastore_UpdateMetadataImport_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_UpdateMetadataImport] +// [END metastore_v1alpha_generated_DataprocMetastore_UpdateMetadataImport_sync] diff --git a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateService/main.go b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateService/main.go index d78e30ef9b4..04d6b417f44 100644 --- a/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateService/main.go +++ b/internal/generated/snippets/metastore/apiv1alpha/DataprocMetastoreClient/UpdateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_UpdateService] +// [START metastore_v1alpha_generated_DataprocMetastore_UpdateService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1alpha_DataprocMetastoreClient_UpdateService] +// [END metastore_v1alpha_generated_DataprocMetastore_UpdateService_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateBackup/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateBackup/main.go index 816ab967a58..13b06a29c5a 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateBackup/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_CreateBackup] +// [START metastore_v1beta_generated_DataprocMetastore_CreateBackup_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_CreateBackup] +// [END metastore_v1beta_generated_DataprocMetastore_CreateBackup_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateMetadataImport/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateMetadataImport/main.go index f468555415b..713ebb3d943 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateMetadataImport/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateMetadataImport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_CreateMetadataImport] +// [START metastore_v1beta_generated_DataprocMetastore_CreateMetadataImport_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_CreateMetadataImport] +// [END metastore_v1beta_generated_DataprocMetastore_CreateMetadataImport_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateService/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateService/main.go index 22fc0f6209d..54016e7eaa3 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateService/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/CreateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_CreateService] +// [START metastore_v1beta_generated_DataprocMetastore_CreateService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_CreateService] +// [END metastore_v1beta_generated_DataprocMetastore_CreateService_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteBackup/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteBackup/main.go index 0c71752ad48..5d4448c5139 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteBackup/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_DeleteBackup] +// [START metastore_v1beta_generated_DataprocMetastore_DeleteBackup_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_DeleteBackup] +// [END metastore_v1beta_generated_DataprocMetastore_DeleteBackup_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteService/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteService/main.go index 4076559cf74..58ea8836bc8 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteService/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_DeleteService] +// [START metastore_v1beta_generated_DataprocMetastore_DeleteService_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_DeleteService] +// [END metastore_v1beta_generated_DataprocMetastore_DeleteService_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ExportMetadata/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ExportMetadata/main.go index 08614033d08..b5e85d1bc6d 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ExportMetadata/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ExportMetadata/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ExportMetadata] +// [START metastore_v1beta_generated_DataprocMetastore_ExportMetadata_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ExportMetadata] +// [END metastore_v1beta_generated_DataprocMetastore_ExportMetadata_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetBackup/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetBackup/main.go index 8687ed31b5a..94939c9a78e 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetBackup/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_GetBackup] +// [START metastore_v1beta_generated_DataprocMetastore_GetBackup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_GetBackup] +// [END metastore_v1beta_generated_DataprocMetastore_GetBackup_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetMetadataImport/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetMetadataImport/main.go index 59daf8ec036..93ef6b542e1 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetMetadataImport/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetMetadataImport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_GetMetadataImport] +// [START metastore_v1beta_generated_DataprocMetastore_GetMetadataImport_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_GetMetadataImport] +// [END metastore_v1beta_generated_DataprocMetastore_GetMetadataImport_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetService/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetService/main.go index 940709afe7d..28166ad15da 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetService/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_GetService] +// [START metastore_v1beta_generated_DataprocMetastore_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_GetService] +// [END metastore_v1beta_generated_DataprocMetastore_GetService_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListBackups/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListBackups/main.go index 07811e294e9..c4d52e0c012 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListBackups/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListBackups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ListBackups] +// [START metastore_v1beta_generated_DataprocMetastore_ListBackups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ListBackups] +// [END metastore_v1beta_generated_DataprocMetastore_ListBackups_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListMetadataImports/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListMetadataImports/main.go index 93576dc0a93..eef879eaabc 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListMetadataImports/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListMetadataImports/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ListMetadataImports] +// [START metastore_v1beta_generated_DataprocMetastore_ListMetadataImports_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ListMetadataImports] +// [END metastore_v1beta_generated_DataprocMetastore_ListMetadataImports_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListServices/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListServices/main.go index a874889bcb4..9b049d5ff13 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListServices/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ListServices] +// [START metastore_v1beta_generated_DataprocMetastore_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_ListServices] +// [END metastore_v1beta_generated_DataprocMetastore_ListServices_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/NewDataprocMetastoreClient/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/NewDataprocMetastoreClient/main.go deleted file mode 100644 index ccf30cdbae8..00000000000 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/NewDataprocMetastoreClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START metastore_generated_metastore_apiv1beta_NewDataprocMetastoreClient] - -package main - -import ( - "context" - - metastore "cloud.google.com/go/metastore/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := metastore.NewDataprocMetastoreClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END metastore_generated_metastore_apiv1beta_NewDataprocMetastoreClient] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/RestoreService/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/RestoreService/main.go index 9b3b9967fb8..8c4195c668c 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/RestoreService/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/RestoreService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_RestoreService] +// [START metastore_v1beta_generated_DataprocMetastore_RestoreService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_RestoreService] +// [END metastore_v1beta_generated_DataprocMetastore_RestoreService_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateMetadataImport/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateMetadataImport/main.go index 954bc471de3..3836753deea 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateMetadataImport/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateMetadataImport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_UpdateMetadataImport] +// [START metastore_v1beta_generated_DataprocMetastore_UpdateMetadataImport_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_UpdateMetadataImport] +// [END metastore_v1beta_generated_DataprocMetastore_UpdateMetadataImport_sync] diff --git a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateService/main.go b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateService/main.go index cd3a84e11a0..71807a64b8d 100644 --- a/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateService/main.go +++ b/internal/generated/snippets/metastore/apiv1beta/DataprocMetastoreClient/UpdateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_UpdateService] +// [START metastore_v1beta_generated_DataprocMetastore_UpdateService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END metastore_generated_metastore_apiv1beta_DataprocMetastoreClient_UpdateService] +// [END metastore_v1beta_generated_DataprocMetastore_UpdateService_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/CreateAlertPolicy/main.go b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/CreateAlertPolicy/main.go index 737e33d3e4d..f251af1f15f 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/CreateAlertPolicy/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/CreateAlertPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_CreateAlertPolicy] +// [START monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_CreateAlertPolicy] +// [END monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/DeleteAlertPolicy/main.go b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/DeleteAlertPolicy/main.go index 1d80eb0cb71..8e79474b069 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/DeleteAlertPolicy/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/DeleteAlertPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_DeleteAlertPolicy] +// [START monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_DeleteAlertPolicy] +// [END monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/GetAlertPolicy/main.go b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/GetAlertPolicy/main.go index b2e649c9a2c..4e21d324af1 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/GetAlertPolicy/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/GetAlertPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_GetAlertPolicy] +// [START monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_GetAlertPolicy] +// [END monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/ListAlertPolicies/main.go b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/ListAlertPolicies/main.go index a76b737d4ec..8c41df47df6 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/ListAlertPolicies/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/ListAlertPolicies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_ListAlertPolicies] +// [START monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_ListAlertPolicies] +// [END monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/NewAlertPolicyClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/NewAlertPolicyClient/main.go deleted file mode 100644 index bc5cf84cd3c..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/NewAlertPolicyClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewAlertPolicyClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewAlertPolicyClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewAlertPolicyClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/UpdateAlertPolicy/main.go b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/UpdateAlertPolicy/main.go index fa2fc664fd4..222a95715a0 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/UpdateAlertPolicy/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/AlertPolicyClient/UpdateAlertPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_UpdateAlertPolicy] +// [START monitoring_v3_generated_AlertPolicyService_UpdateAlertPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_AlertPolicyClient_UpdateAlertPolicy] +// [END monitoring_v3_generated_AlertPolicyService_UpdateAlertPolicy_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/CreateGroup/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/CreateGroup/main.go index c635f401e05..0e2d7e17391 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/CreateGroup/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/CreateGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_GroupClient_CreateGroup] +// [START monitoring_v3_generated_GroupService_CreateGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_GroupClient_CreateGroup] +// [END monitoring_v3_generated_GroupService_CreateGroup_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/DeleteGroup/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/DeleteGroup/main.go index 57aff453812..cbf0781e922 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/DeleteGroup/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/DeleteGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_GroupClient_DeleteGroup] +// [START monitoring_v3_generated_GroupService_DeleteGroup_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_GroupClient_DeleteGroup] +// [END monitoring_v3_generated_GroupService_DeleteGroup_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/GetGroup/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/GetGroup/main.go index b786da462c3..e70e8373939 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/GetGroup/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/GetGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_GroupClient_GetGroup] +// [START monitoring_v3_generated_GroupService_GetGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_GroupClient_GetGroup] +// [END monitoring_v3_generated_GroupService_GetGroup_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroupMembers/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroupMembers/main.go index 66015a726de..bda1dc9fea3 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroupMembers/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroupMembers/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_GroupClient_ListGroupMembers] +// [START monitoring_v3_generated_GroupService_ListGroupMembers_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_GroupClient_ListGroupMembers] +// [END monitoring_v3_generated_GroupService_ListGroupMembers_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroups/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroups/main.go index 2a70019237c..d1bde033690 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroups/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/ListGroups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_GroupClient_ListGroups] +// [START monitoring_v3_generated_GroupService_ListGroups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_GroupClient_ListGroups] +// [END monitoring_v3_generated_GroupService_ListGroups_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/NewGroupClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/NewGroupClient/main.go deleted file mode 100644 index 8a7decb0cef..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/NewGroupClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewGroupClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewGroupClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewGroupClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/UpdateGroup/main.go b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/UpdateGroup/main.go index 6ba5fafe299..cd5daa448ac 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/UpdateGroup/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/GroupClient/UpdateGroup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_GroupClient_UpdateGroup] +// [START monitoring_v3_generated_GroupService_UpdateGroup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_GroupClient_UpdateGroup] +// [END monitoring_v3_generated_GroupService_UpdateGroup_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateMetricDescriptor/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateMetricDescriptor/main.go index 19bf3e6781b..2d9acf0a079 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateMetricDescriptor/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateMetricDescriptor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_CreateMetricDescriptor] +// [START monitoring_v3_generated_MetricService_CreateMetricDescriptor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_CreateMetricDescriptor] +// [END monitoring_v3_generated_MetricService_CreateMetricDescriptor_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateTimeSeries/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateTimeSeries/main.go index ed73550c407..5887bbb0fe3 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateTimeSeries/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/CreateTimeSeries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_CreateTimeSeries] +// [START monitoring_v3_generated_MetricService_CreateTimeSeries_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_CreateTimeSeries] +// [END monitoring_v3_generated_MetricService_CreateTimeSeries_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/DeleteMetricDescriptor/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/DeleteMetricDescriptor/main.go index b3fa711d158..fec289ac41d 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/DeleteMetricDescriptor/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/DeleteMetricDescriptor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_DeleteMetricDescriptor] +// [START monitoring_v3_generated_MetricService_DeleteMetricDescriptor_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_DeleteMetricDescriptor] +// [END monitoring_v3_generated_MetricService_DeleteMetricDescriptor_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMetricDescriptor/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMetricDescriptor/main.go index e5976e029d9..5d29dcd3a96 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMetricDescriptor/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMetricDescriptor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_GetMetricDescriptor] +// [START monitoring_v3_generated_MetricService_GetMetricDescriptor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_GetMetricDescriptor] +// [END monitoring_v3_generated_MetricService_GetMetricDescriptor_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMonitoredResourceDescriptor/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMonitoredResourceDescriptor/main.go index b3cf7dcbf21..cd1cd5b8be1 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMonitoredResourceDescriptor/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/GetMonitoredResourceDescriptor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_GetMonitoredResourceDescriptor] +// [START monitoring_v3_generated_MetricService_GetMonitoredResourceDescriptor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_GetMonitoredResourceDescriptor] +// [END monitoring_v3_generated_MetricService_GetMonitoredResourceDescriptor_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMetricDescriptors/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMetricDescriptors/main.go index 7e4c092d5a0..fb6f87ac471 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMetricDescriptors/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMetricDescriptors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_ListMetricDescriptors] +// [START monitoring_v3_generated_MetricService_ListMetricDescriptors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_ListMetricDescriptors] +// [END monitoring_v3_generated_MetricService_ListMetricDescriptors_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMonitoredResourceDescriptors/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMonitoredResourceDescriptors/main.go index 98ad86f5010..e9b4b1da389 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMonitoredResourceDescriptors/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListMonitoredResourceDescriptors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_ListMonitoredResourceDescriptors] +// [START monitoring_v3_generated_MetricService_ListMonitoredResourceDescriptors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_ListMonitoredResourceDescriptors] +// [END monitoring_v3_generated_MetricService_ListMonitoredResourceDescriptors_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListTimeSeries/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListTimeSeries/main.go index 459b24d7bd3..9a31957d34b 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListTimeSeries/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/ListTimeSeries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_MetricClient_ListTimeSeries] +// [START monitoring_v3_generated_MetricService_ListTimeSeries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_MetricClient_ListTimeSeries] +// [END monitoring_v3_generated_MetricService_ListTimeSeries_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/NewMetricClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/NewMetricClient/main.go deleted file mode 100644 index 43aab07f4df..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/MetricClient/NewMetricClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewMetricClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewMetricClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewMetricClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/CreateNotificationChannel/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/CreateNotificationChannel/main.go index e1d30bce5c1..0507b35e1a0 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/CreateNotificationChannel/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/CreateNotificationChannel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_CreateNotificationChannel] +// [START monitoring_v3_generated_NotificationChannelService_CreateNotificationChannel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_CreateNotificationChannel] +// [END monitoring_v3_generated_NotificationChannelService_CreateNotificationChannel_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/DeleteNotificationChannel/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/DeleteNotificationChannel/main.go index 8e995c7e2f0..b9e27534916 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/DeleteNotificationChannel/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/DeleteNotificationChannel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_DeleteNotificationChannel] +// [START monitoring_v3_generated_NotificationChannelService_DeleteNotificationChannel_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_DeleteNotificationChannel] +// [END monitoring_v3_generated_NotificationChannelService_DeleteNotificationChannel_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannel/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannel/main.go index 68810cadb5a..3997d2969dd 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannel/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_GetNotificationChannel] +// [START monitoring_v3_generated_NotificationChannelService_GetNotificationChannel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_GetNotificationChannel] +// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannel_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelDescriptor/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelDescriptor/main.go index 1dad6308a26..605a070f486 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelDescriptor/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelDescriptor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_GetNotificationChannelDescriptor] +// [START monitoring_v3_generated_NotificationChannelService_GetNotificationChannelDescriptor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_GetNotificationChannelDescriptor] +// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannelDescriptor_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelVerificationCode/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelVerificationCode/main.go index f93170cff6e..57d519f3789 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelVerificationCode/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/GetNotificationChannelVerificationCode/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_GetNotificationChannelVerificationCode] +// [START monitoring_v3_generated_NotificationChannelService_GetNotificationChannelVerificationCode_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_GetNotificationChannelVerificationCode] +// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannelVerificationCode_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannelDescriptors/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannelDescriptors/main.go index 99184baa475..acb973ebbfb 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannelDescriptors/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannelDescriptors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_ListNotificationChannelDescriptors] +// [START monitoring_v3_generated_NotificationChannelService_ListNotificationChannelDescriptors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_ListNotificationChannelDescriptors] +// [END monitoring_v3_generated_NotificationChannelService_ListNotificationChannelDescriptors_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannels/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannels/main.go index 53a6264362b..6b25f22e31a 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannels/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/ListNotificationChannels/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_ListNotificationChannels] +// [START monitoring_v3_generated_NotificationChannelService_ListNotificationChannels_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_ListNotificationChannels] +// [END monitoring_v3_generated_NotificationChannelService_ListNotificationChannels_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/NewNotificationChannelClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/NewNotificationChannelClient/main.go deleted file mode 100644 index 248717033d3..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/NewNotificationChannelClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewNotificationChannelClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewNotificationChannelClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewNotificationChannelClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/SendNotificationChannelVerificationCode/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/SendNotificationChannelVerificationCode/main.go index 6634973f0da..e2381597978 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/SendNotificationChannelVerificationCode/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/SendNotificationChannelVerificationCode/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_SendNotificationChannelVerificationCode] +// [START monitoring_v3_generated_NotificationChannelService_SendNotificationChannelVerificationCode_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_SendNotificationChannelVerificationCode] +// [END monitoring_v3_generated_NotificationChannelService_SendNotificationChannelVerificationCode_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/UpdateNotificationChannel/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/UpdateNotificationChannel/main.go index a6aaa17c7da..59658455db0 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/UpdateNotificationChannel/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/UpdateNotificationChannel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_UpdateNotificationChannel] +// [START monitoring_v3_generated_NotificationChannelService_UpdateNotificationChannel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_UpdateNotificationChannel] +// [END monitoring_v3_generated_NotificationChannelService_UpdateNotificationChannel_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/VerifyNotificationChannel/main.go b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/VerifyNotificationChannel/main.go index 74406e52754..e6fb5c8c211 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/VerifyNotificationChannel/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/NotificationChannelClient/VerifyNotificationChannel/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_VerifyNotificationChannel] +// [START monitoring_v3_generated_NotificationChannelService_VerifyNotificationChannel_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_NotificationChannelClient_VerifyNotificationChannel] +// [END monitoring_v3_generated_NotificationChannelService_VerifyNotificationChannel_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/NewQueryClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/NewQueryClient/main.go deleted file mode 100644 index 1dd507a6338..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/NewQueryClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewQueryClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewQueryClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewQueryClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/QueryTimeSeries/main.go b/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/QueryTimeSeries/main.go index 25d3fb7f3a6..240712a2abc 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/QueryTimeSeries/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/QueryClient/QueryTimeSeries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_QueryClient_QueryTimeSeries] +// [START monitoring_v3_generated_QueryService_QueryTimeSeries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_QueryClient_QueryTimeSeries] +// [END monitoring_v3_generated_QueryService_QueryTimeSeries_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateService/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateService/main.go index d90bf9fd86e..34a8a63ae0d 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateService/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_CreateService] +// [START monitoring_v3_generated_ServiceMonitoringService_CreateService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_CreateService] +// [END monitoring_v3_generated_ServiceMonitoringService_CreateService_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateServiceLevelObjective/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateServiceLevelObjective/main.go index b58be59205a..535a85984de 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateServiceLevelObjective/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/CreateServiceLevelObjective/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_CreateServiceLevelObjective] +// [START monitoring_v3_generated_ServiceMonitoringService_CreateServiceLevelObjective_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_CreateServiceLevelObjective] +// [END monitoring_v3_generated_ServiceMonitoringService_CreateServiceLevelObjective_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteService/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteService/main.go index 4d39469812e..993f3e895ff 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteService/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_DeleteService] +// [START monitoring_v3_generated_ServiceMonitoringService_DeleteService_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_DeleteService] +// [END monitoring_v3_generated_ServiceMonitoringService_DeleteService_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteServiceLevelObjective/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteServiceLevelObjective/main.go index bb97e4bb8d9..ccf6cf56ca4 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteServiceLevelObjective/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/DeleteServiceLevelObjective/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_DeleteServiceLevelObjective] +// [START monitoring_v3_generated_ServiceMonitoringService_DeleteServiceLevelObjective_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_DeleteServiceLevelObjective] +// [END monitoring_v3_generated_ServiceMonitoringService_DeleteServiceLevelObjective_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetService/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetService/main.go index 8b783a50f4f..1d62a2f9364 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetService/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_GetService] +// [START monitoring_v3_generated_ServiceMonitoringService_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_GetService] +// [END monitoring_v3_generated_ServiceMonitoringService_GetService_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetServiceLevelObjective/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetServiceLevelObjective/main.go index b2d57828992..8f460db5c72 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetServiceLevelObjective/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/GetServiceLevelObjective/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_GetServiceLevelObjective] +// [START monitoring_v3_generated_ServiceMonitoringService_GetServiceLevelObjective_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_GetServiceLevelObjective] +// [END monitoring_v3_generated_ServiceMonitoringService_GetServiceLevelObjective_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServiceLevelObjectives/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServiceLevelObjectives/main.go index 05fffa6f59e..818b5c5a2d1 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServiceLevelObjectives/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServiceLevelObjectives/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_ListServiceLevelObjectives] +// [START monitoring_v3_generated_ServiceMonitoringService_ListServiceLevelObjectives_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_ListServiceLevelObjectives] +// [END monitoring_v3_generated_ServiceMonitoringService_ListServiceLevelObjectives_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServices/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServices/main.go index adb68c32a5c..648ead30a71 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServices/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_ListServices] +// [START monitoring_v3_generated_ServiceMonitoringService_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_ListServices] +// [END monitoring_v3_generated_ServiceMonitoringService_ListServices_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/NewServiceMonitoringClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/NewServiceMonitoringClient/main.go deleted file mode 100644 index 719ca30d1f2..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/NewServiceMonitoringClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewServiceMonitoringClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewServiceMonitoringClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewServiceMonitoringClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateService/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateService/main.go index d1830c1433e..7f91151c5f4 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateService/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_UpdateService] +// [START monitoring_v3_generated_ServiceMonitoringService_UpdateService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_UpdateService] +// [END monitoring_v3_generated_ServiceMonitoringService_UpdateService_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateServiceLevelObjective/main.go b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateServiceLevelObjective/main.go index 813c53855b3..d4d5ecda045 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateServiceLevelObjective/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/ServiceMonitoringClient/UpdateServiceLevelObjective/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_UpdateServiceLevelObjective] +// [START monitoring_v3_generated_ServiceMonitoringService_UpdateServiceLevelObjective_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_ServiceMonitoringClient_UpdateServiceLevelObjective] +// [END monitoring_v3_generated_ServiceMonitoringService_UpdateServiceLevelObjective_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/CreateUptimeCheckConfig/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/CreateUptimeCheckConfig/main.go index 5340fd83961..01761d95a35 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/CreateUptimeCheckConfig/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/CreateUptimeCheckConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_CreateUptimeCheckConfig] +// [START monitoring_v3_generated_UptimeCheckService_CreateUptimeCheckConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_CreateUptimeCheckConfig] +// [END monitoring_v3_generated_UptimeCheckService_CreateUptimeCheckConfig_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/DeleteUptimeCheckConfig/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/DeleteUptimeCheckConfig/main.go index 3881b784070..bd605e5fa14 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/DeleteUptimeCheckConfig/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/DeleteUptimeCheckConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_DeleteUptimeCheckConfig] +// [START monitoring_v3_generated_UptimeCheckService_DeleteUptimeCheckConfig_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_DeleteUptimeCheckConfig] +// [END monitoring_v3_generated_UptimeCheckService_DeleteUptimeCheckConfig_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/GetUptimeCheckConfig/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/GetUptimeCheckConfig/main.go index 683fa158e6c..6d231383fbd 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/GetUptimeCheckConfig/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/GetUptimeCheckConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_GetUptimeCheckConfig] +// [START monitoring_v3_generated_UptimeCheckService_GetUptimeCheckConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_GetUptimeCheckConfig] +// [END monitoring_v3_generated_UptimeCheckService_GetUptimeCheckConfig_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckConfigs/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckConfigs/main.go index d2fe781ab38..ebf69a893e1 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckConfigs/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_ListUptimeCheckConfigs] +// [START monitoring_v3_generated_UptimeCheckService_ListUptimeCheckConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_ListUptimeCheckConfigs] +// [END monitoring_v3_generated_UptimeCheckService_ListUptimeCheckConfigs_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckIps/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckIps/main.go index 21e250e71b8..9bdd888a185 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckIps/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/ListUptimeCheckIps/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_ListUptimeCheckIps] +// [START monitoring_v3_generated_UptimeCheckService_ListUptimeCheckIps_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_ListUptimeCheckIps] +// [END monitoring_v3_generated_UptimeCheckService_ListUptimeCheckIps_sync] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/NewUptimeCheckClient/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/NewUptimeCheckClient/main.go deleted file mode 100644 index d74a8688e68..00000000000 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/NewUptimeCheckClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_apiv3_v2_NewUptimeCheckClient] - -package main - -import ( - "context" - - monitoring "cloud.google.com/go/monitoring/apiv3/v2" -) - -func main() { - ctx := context.Background() - c, err := monitoring.NewUptimeCheckClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_apiv3_v2_NewUptimeCheckClient] diff --git a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/UpdateUptimeCheckConfig/main.go b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/UpdateUptimeCheckConfig/main.go index 0da1911bff8..80fd7e5b90d 100644 --- a/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/UpdateUptimeCheckConfig/main.go +++ b/internal/generated/snippets/monitoring/apiv3/v2/UptimeCheckClient/UpdateUptimeCheckConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_UpdateUptimeCheckConfig] +// [START monitoring_v3_generated_UptimeCheckService_UpdateUptimeCheckConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_apiv3_v2_UptimeCheckClient_UpdateUptimeCheckConfig] +// [END monitoring_v3_generated_UptimeCheckService_UpdateUptimeCheckConfig_sync] diff --git a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/CreateDashboard/main.go b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/CreateDashboard/main.go index 42394a3e78e..8d14b491d3d 100644 --- a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/CreateDashboard/main.go +++ b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/CreateDashboard/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_CreateDashboard] +// [START monitoring_v1_generated_DashboardsService_CreateDashboard_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_CreateDashboard] +// [END monitoring_v1_generated_DashboardsService_CreateDashboard_sync] diff --git a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/DeleteDashboard/main.go b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/DeleteDashboard/main.go index 8a65191b305..e8cd8e6bce0 100644 --- a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/DeleteDashboard/main.go +++ b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/DeleteDashboard/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_DeleteDashboard] +// [START monitoring_v1_generated_DashboardsService_DeleteDashboard_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_DeleteDashboard] +// [END monitoring_v1_generated_DashboardsService_DeleteDashboard_sync] diff --git a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/GetDashboard/main.go b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/GetDashboard/main.go index f1abc59d59f..d1322310c7c 100644 --- a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/GetDashboard/main.go +++ b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/GetDashboard/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_GetDashboard] +// [START monitoring_v1_generated_DashboardsService_GetDashboard_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_GetDashboard] +// [END monitoring_v1_generated_DashboardsService_GetDashboard_sync] diff --git a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/ListDashboards/main.go b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/ListDashboards/main.go index 0b38d8bc054..e7a6cbf24fe 100644 --- a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/ListDashboards/main.go +++ b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/ListDashboards/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_ListDashboards] +// [START monitoring_v1_generated_DashboardsService_ListDashboards_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_ListDashboards] +// [END monitoring_v1_generated_DashboardsService_ListDashboards_sync] diff --git a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/NewDashboardsClient/main.go b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/NewDashboardsClient/main.go deleted file mode 100644 index 2b7ab804d00..00000000000 --- a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/NewDashboardsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START monitoring_generated_monitoring_dashboard_apiv1_NewDashboardsClient] - -package main - -import ( - "context" - - dashboard "cloud.google.com/go/monitoring/dashboard/apiv1" -) - -func main() { - ctx := context.Background() - c, err := dashboard.NewDashboardsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END monitoring_generated_monitoring_dashboard_apiv1_NewDashboardsClient] diff --git a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/UpdateDashboard/main.go b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/UpdateDashboard/main.go index 94b632251e5..601ea48d91d 100644 --- a/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/UpdateDashboard/main.go +++ b/internal/generated/snippets/monitoring/dashboard/apiv1/DashboardsClient/UpdateDashboard/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_UpdateDashboard] +// [START monitoring_v1_generated_DashboardsService_UpdateDashboard_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END monitoring_generated_monitoring_dashboard_apiv1_DashboardsClient_UpdateDashboard] +// [END monitoring_v1_generated_DashboardsService_UpdateDashboard_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateHub/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateHub/main.go index bdff42927b0..4656b2cdbb8 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateHub/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateHub/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_CreateHub] +// [START networkconnectivity_v1alpha1_generated_HubService_CreateHub_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_CreateHub] +// [END networkconnectivity_v1alpha1_generated_HubService_CreateHub_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateSpoke/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateSpoke/main.go index 54abd163517..0929ec41b34 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateSpoke/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/CreateSpoke/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_CreateSpoke] +// [START networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_CreateSpoke] +// [END networkconnectivity_v1alpha1_generated_HubService_CreateSpoke_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteHub/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteHub/main.go index 839f9ccde3b..7cd11abd6f1 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteHub/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteHub/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_DeleteHub] +// [START networkconnectivity_v1alpha1_generated_HubService_DeleteHub_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_DeleteHub] +// [END networkconnectivity_v1alpha1_generated_HubService_DeleteHub_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteSpoke/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteSpoke/main.go index 907d2e97147..c66bf0f5ccb 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteSpoke/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/DeleteSpoke/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_DeleteSpoke] +// [START networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_DeleteSpoke] +// [END networkconnectivity_v1alpha1_generated_HubService_DeleteSpoke_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetHub/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetHub/main.go index 9b1b1022aa0..fc9824ea165 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetHub/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetHub/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_GetHub] +// [START networkconnectivity_v1alpha1_generated_HubService_GetHub_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_GetHub] +// [END networkconnectivity_v1alpha1_generated_HubService_GetHub_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetSpoke/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetSpoke/main.go index 371e65b6191..e64cba50cf9 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetSpoke/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/GetSpoke/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_GetSpoke] +// [START networkconnectivity_v1alpha1_generated_HubService_GetSpoke_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_GetSpoke] +// [END networkconnectivity_v1alpha1_generated_HubService_GetSpoke_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListHubs/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListHubs/main.go index 1c3b52263b7..b87cadcca8b 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListHubs/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListHubs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_ListHubs] +// [START networkconnectivity_v1alpha1_generated_HubService_ListHubs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_ListHubs] +// [END networkconnectivity_v1alpha1_generated_HubService_ListHubs_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListSpokes/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListSpokes/main.go index b02756c12d9..43e4bb34530 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListSpokes/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/ListSpokes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_ListSpokes] +// [START networkconnectivity_v1alpha1_generated_HubService_ListSpokes_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_ListSpokes] +// [END networkconnectivity_v1alpha1_generated_HubService_ListSpokes_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/NewHubClient/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/NewHubClient/main.go deleted file mode 100644 index e42b115a391..00000000000 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/NewHubClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_NewHubClient] - -package main - -import ( - "context" - - networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1" -) - -func main() { - ctx := context.Background() - c, err := networkconnectivity.NewHubClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_NewHubClient] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateHub/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateHub/main.go index 287b116b3e1..8b06b4f091e 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateHub/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateHub/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_UpdateHub] +// [START networkconnectivity_v1alpha1_generated_HubService_UpdateHub_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_UpdateHub] +// [END networkconnectivity_v1alpha1_generated_HubService_UpdateHub_sync] diff --git a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateSpoke/main.go b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateSpoke/main.go index 3dedb0eedc6..0c3fdbfa126 100644 --- a/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateSpoke/main.go +++ b/internal/generated/snippets/networkconnectivity/apiv1alpha1/HubClient/UpdateSpoke/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_UpdateSpoke] +// [START networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END networkconnectivity_generated_networkconnectivity_apiv1alpha1_HubClient_UpdateSpoke] +// [END networkconnectivity_v1alpha1_generated_HubService_UpdateSpoke_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateEnvironment/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateEnvironment/main.go index 7f751fc3a59..084e538d68a 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateEnvironment/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_CreateEnvironment] +// [START notebooks_v1beta1_generated_NotebookService_CreateEnvironment_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_CreateEnvironment] +// [END notebooks_v1beta1_generated_NotebookService_CreateEnvironment_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateInstance/main.go index fdba08f1da7..ec535f6c3ca 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/CreateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_CreateInstance] +// [START notebooks_v1beta1_generated_NotebookService_CreateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_CreateInstance] +// [END notebooks_v1beta1_generated_NotebookService_CreateInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteEnvironment/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteEnvironment/main.go index ed3edd75ff5..faa87ae40ef 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteEnvironment/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_DeleteEnvironment] +// [START notebooks_v1beta1_generated_NotebookService_DeleteEnvironment_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_DeleteEnvironment] +// [END notebooks_v1beta1_generated_NotebookService_DeleteEnvironment_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteInstance/main.go index 131aece200b..66e4955b1db 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_DeleteInstance] +// [START notebooks_v1beta1_generated_NotebookService_DeleteInstance_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_DeleteInstance] +// [END notebooks_v1beta1_generated_NotebookService_DeleteInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetEnvironment/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetEnvironment/main.go index 0dd7d2270cb..3cd0a5d90c1 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetEnvironment/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetEnvironment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_GetEnvironment] +// [START notebooks_v1beta1_generated_NotebookService_GetEnvironment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_GetEnvironment] +// [END notebooks_v1beta1_generated_NotebookService_GetEnvironment_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetInstance/main.go index 791548cb3dd..cb81d9abaa9 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_GetInstance] +// [START notebooks_v1beta1_generated_NotebookService_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_GetInstance] +// [END notebooks_v1beta1_generated_NotebookService_GetInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/IsInstanceUpgradeable/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/IsInstanceUpgradeable/main.go index fa1cf86759d..97c68f8de20 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/IsInstanceUpgradeable/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/IsInstanceUpgradeable/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_IsInstanceUpgradeable] +// [START notebooks_v1beta1_generated_NotebookService_IsInstanceUpgradeable_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_IsInstanceUpgradeable] +// [END notebooks_v1beta1_generated_NotebookService_IsInstanceUpgradeable_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListEnvironments/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListEnvironments/main.go index 588095d662c..6674a0cf843 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListEnvironments/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListEnvironments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_ListEnvironments] +// [START notebooks_v1beta1_generated_NotebookService_ListEnvironments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_ListEnvironments] +// [END notebooks_v1beta1_generated_NotebookService_ListEnvironments_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListInstances/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListInstances/main.go index e4fbe1773da..84e0978ef4c 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListInstances/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_ListInstances] +// [START notebooks_v1beta1_generated_NotebookService_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_ListInstances] +// [END notebooks_v1beta1_generated_NotebookService_ListInstances_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/NewNotebookClient/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/NewNotebookClient/main.go deleted file mode 100644 index 4a03cb8a9fc..00000000000 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/NewNotebookClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START notebooks_generated_notebooks_apiv1beta1_NewNotebookClient] - -package main - -import ( - "context" - - notebooks "cloud.google.com/go/notebooks/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := notebooks.NewNotebookClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END notebooks_generated_notebooks_apiv1beta1_NewNotebookClient] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/RegisterInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/RegisterInstance/main.go index 840ed6d718a..837aef31b3f 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/RegisterInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/RegisterInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_RegisterInstance] +// [START notebooks_v1beta1_generated_NotebookService_RegisterInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_RegisterInstance] +// [END notebooks_v1beta1_generated_NotebookService_RegisterInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ReportInstanceInfo/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ReportInstanceInfo/main.go index 8ae0b21ebe1..87494e34480 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ReportInstanceInfo/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ReportInstanceInfo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_ReportInstanceInfo] +// [START notebooks_v1beta1_generated_NotebookService_ReportInstanceInfo_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_ReportInstanceInfo] +// [END notebooks_v1beta1_generated_NotebookService_ReportInstanceInfo_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ResetInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ResetInstance/main.go index 4b03a9641bf..740c178117b 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ResetInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/ResetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_ResetInstance] +// [START notebooks_v1beta1_generated_NotebookService_ResetInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_ResetInstance] +// [END notebooks_v1beta1_generated_NotebookService_ResetInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceAccelerator/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceAccelerator/main.go index 4a8b36d1e82..ab91e889148 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceAccelerator/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceAccelerator/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_SetInstanceAccelerator] +// [START notebooks_v1beta1_generated_NotebookService_SetInstanceAccelerator_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_SetInstanceAccelerator] +// [END notebooks_v1beta1_generated_NotebookService_SetInstanceAccelerator_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceLabels/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceLabels/main.go index 15fc1e26779..35f84c28ab8 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceLabels/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceLabels/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_SetInstanceLabels] +// [START notebooks_v1beta1_generated_NotebookService_SetInstanceLabels_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_SetInstanceLabels] +// [END notebooks_v1beta1_generated_NotebookService_SetInstanceLabels_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceMachineType/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceMachineType/main.go index bf78ab7035d..78f9104130e 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceMachineType/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/SetInstanceMachineType/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_SetInstanceMachineType] +// [START notebooks_v1beta1_generated_NotebookService_SetInstanceMachineType_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_SetInstanceMachineType] +// [END notebooks_v1beta1_generated_NotebookService_SetInstanceMachineType_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StartInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StartInstance/main.go index 77eef5c951d..8ed3026a417 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StartInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StartInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_StartInstance] +// [START notebooks_v1beta1_generated_NotebookService_StartInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_StartInstance] +// [END notebooks_v1beta1_generated_NotebookService_StartInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StopInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StopInstance/main.go index 5cb75d9f8c9..859376ead21 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StopInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/StopInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_StopInstance] +// [START notebooks_v1beta1_generated_NotebookService_StopInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_StopInstance] +// [END notebooks_v1beta1_generated_NotebookService_StopInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstance/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstance/main.go index 48d21be1bfb..0a3d8500f54 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstance/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_UpgradeInstance] +// [START notebooks_v1beta1_generated_NotebookService_UpgradeInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_UpgradeInstance] +// [END notebooks_v1beta1_generated_NotebookService_UpgradeInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstanceInternal/main.go b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstanceInternal/main.go index 281acf57791..6f1539fbace 100644 --- a/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstanceInternal/main.go +++ b/internal/generated/snippets/notebooks/apiv1beta1/NotebookClient/UpgradeInstanceInternal/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START notebooks_generated_notebooks_apiv1beta1_NotebookClient_UpgradeInstanceInternal] +// [START notebooks_v1beta1_generated_NotebookService_UpgradeInstanceInternal_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END notebooks_generated_notebooks_apiv1beta1_NotebookClient_UpgradeInstanceInternal] +// [END notebooks_v1beta1_generated_NotebookService_UpgradeInstanceInternal_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/CreatePolicy/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/CreatePolicy/main.go index a514c1216ab..b0886f02364 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/CreatePolicy/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/CreatePolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_CreatePolicy] +// [START orgpolicy_v2_generated_OrgPolicy_CreatePolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_CreatePolicy] +// [END orgpolicy_v2_generated_OrgPolicy_CreatePolicy_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/DeletePolicy/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/DeletePolicy/main.go index 05b9e93366e..352334f8863 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/DeletePolicy/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/DeletePolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_DeletePolicy] +// [START orgpolicy_v2_generated_OrgPolicy_DeletePolicy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_DeletePolicy] +// [END orgpolicy_v2_generated_OrgPolicy_DeletePolicy_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/GetEffectivePolicy/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/GetEffectivePolicy/main.go index 556ca490b38..62384b9d338 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/GetEffectivePolicy/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/GetEffectivePolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_GetEffectivePolicy] +// [START orgpolicy_v2_generated_OrgPolicy_GetEffectivePolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_GetEffectivePolicy] +// [END orgpolicy_v2_generated_OrgPolicy_GetEffectivePolicy_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/GetPolicy/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/GetPolicy/main.go index a6ee1348da3..0aa70408c88 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/GetPolicy/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/GetPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_GetPolicy] +// [START orgpolicy_v2_generated_OrgPolicy_GetPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_GetPolicy] +// [END orgpolicy_v2_generated_OrgPolicy_GetPolicy_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/ListConstraints/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/ListConstraints/main.go index 066b5e38cbc..dcc95389fe4 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/ListConstraints/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/ListConstraints/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_ListConstraints] +// [START orgpolicy_v2_generated_OrgPolicy_ListConstraints_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_ListConstraints] +// [END orgpolicy_v2_generated_OrgPolicy_ListConstraints_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/ListPolicies/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/ListPolicies/main.go index ae3683db3b5..b6bee49c0cf 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/ListPolicies/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/ListPolicies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_ListPolicies] +// [START orgpolicy_v2_generated_OrgPolicy_ListPolicies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_ListPolicies] +// [END orgpolicy_v2_generated_OrgPolicy_ListPolicies_sync] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/NewClient/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/NewClient/main.go deleted file mode 100644 index 47e678939d9..00000000000 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START orgpolicy_generated_orgpolicy_apiv2_NewClient] - -package main - -import ( - "context" - - orgpolicy "cloud.google.com/go/orgpolicy/apiv2" -) - -func main() { - ctx := context.Background() - c, err := orgpolicy.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END orgpolicy_generated_orgpolicy_apiv2_NewClient] diff --git a/internal/generated/snippets/orgpolicy/apiv2/Client/UpdatePolicy/main.go b/internal/generated/snippets/orgpolicy/apiv2/Client/UpdatePolicy/main.go index 33c990dc353..8c2536bcf0f 100644 --- a/internal/generated/snippets/orgpolicy/apiv2/Client/UpdatePolicy/main.go +++ b/internal/generated/snippets/orgpolicy/apiv2/Client/UpdatePolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START orgpolicy_generated_orgpolicy_apiv2_Client_UpdatePolicy] +// [START orgpolicy_v2_generated_OrgPolicy_UpdatePolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END orgpolicy_generated_orgpolicy_apiv2_Client_UpdatePolicy] +// [END orgpolicy_v2_generated_OrgPolicy_UpdatePolicy_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/NewClient/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/NewClient/main.go deleted file mode 100644 index 681e79b2171..00000000000 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START osconfig_generated_osconfig_agentendpoint_apiv1_NewClient] - -package main - -import ( - "context" - - agentendpoint "cloud.google.com/go/osconfig/agentendpoint/apiv1" -) - -func main() { - ctx := context.Background() - c, err := agentendpoint.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END osconfig_generated_osconfig_agentendpoint_apiv1_NewClient] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/RegisterAgent/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/RegisterAgent/main.go index a1ba286e826..c377802ad34 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/RegisterAgent/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/RegisterAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1_Client_RegisterAgent] +// [START osconfig_v1_generated_AgentEndpointService_RegisterAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1_Client_RegisterAgent] +// [END osconfig_v1_generated_AgentEndpointService_RegisterAgent_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportInventory/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportInventory/main.go index dbe516fddde..0b498e07f2e 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportInventory/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportInventory/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1_Client_ReportInventory] +// [START osconfig_v1_generated_AgentEndpointService_ReportInventory_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1_Client_ReportInventory] +// [END osconfig_v1_generated_AgentEndpointService_ReportInventory_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskComplete/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskComplete/main.go index eda3eeb8c58..fdb0de8ae01 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskComplete/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskComplete/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1_Client_ReportTaskComplete] +// [START osconfig_v1_generated_AgentEndpointService_ReportTaskComplete_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1_Client_ReportTaskComplete] +// [END osconfig_v1_generated_AgentEndpointService_ReportTaskComplete_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskProgress/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskProgress/main.go index 867624e8b9b..ce8e5e90fa4 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskProgress/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/ReportTaskProgress/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1_Client_ReportTaskProgress] +// [START osconfig_v1_generated_AgentEndpointService_ReportTaskProgress_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1_Client_ReportTaskProgress] +// [END osconfig_v1_generated_AgentEndpointService_ReportTaskProgress_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/StartNextTask/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/StartNextTask/main.go index fd4ffa60628..d58bfbea0e4 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/StartNextTask/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1/Client/StartNextTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1_Client_StartNextTask] +// [START osconfig_v1_generated_AgentEndpointService_StartNextTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1_Client_StartNextTask] +// [END osconfig_v1_generated_AgentEndpointService_StartNextTask_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go index 0969da899af..114502b7b55 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_LookupEffectiveGuestPolicy] +// [START osconfig_v1beta_generated_AgentEndpointService_LookupEffectiveGuestPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_LookupEffectiveGuestPolicy] +// [END osconfig_v1beta_generated_AgentEndpointService_LookupEffectiveGuestPolicy_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/NewClient/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/NewClient/main.go deleted file mode 100644 index 16d75cd595e..00000000000 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START osconfig_generated_osconfig_agentendpoint_apiv1beta_NewClient] - -package main - -import ( - "context" - - agentendpoint "cloud.google.com/go/osconfig/agentendpoint/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := agentendpoint.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END osconfig_generated_osconfig_agentendpoint_apiv1beta_NewClient] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/RegisterAgent/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/RegisterAgent/main.go index 4e76464fcf1..29c8e47ee8c 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/RegisterAgent/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/RegisterAgent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_RegisterAgent] +// [START osconfig_v1beta_generated_AgentEndpointService_RegisterAgent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_RegisterAgent] +// [END osconfig_v1beta_generated_AgentEndpointService_RegisterAgent_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskComplete/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskComplete/main.go index f74c5919ee0..d140e8a4b35 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskComplete/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskComplete/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_ReportTaskComplete] +// [START osconfig_v1beta_generated_AgentEndpointService_ReportTaskComplete_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_ReportTaskComplete] +// [END osconfig_v1beta_generated_AgentEndpointService_ReportTaskComplete_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskProgress/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskProgress/main.go index b600dd05c0c..1c2f07ad9b8 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskProgress/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/ReportTaskProgress/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_ReportTaskProgress] +// [START osconfig_v1beta_generated_AgentEndpointService_ReportTaskProgress_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_ReportTaskProgress] +// [END osconfig_v1beta_generated_AgentEndpointService_ReportTaskProgress_sync] diff --git a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/StartNextTask/main.go b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/StartNextTask/main.go index 0f358d95ab7..262dfb9f522 100644 --- a/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/StartNextTask/main.go +++ b/internal/generated/snippets/osconfig/agentendpoint/apiv1beta/Client/StartNextTask/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_StartNextTask] +// [START osconfig_v1beta_generated_AgentEndpointService_StartNextTask_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_agentendpoint_apiv1beta_Client_StartNextTask] +// [END osconfig_v1beta_generated_AgentEndpointService_StartNextTask_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/CancelPatchJob/main.go b/internal/generated/snippets/osconfig/apiv1/Client/CancelPatchJob/main.go index ff5b04f1329..46adbcb5ca2 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/CancelPatchJob/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/CancelPatchJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_CancelPatchJob] +// [START osconfig_v1_generated_OsConfigService_CancelPatchJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1_Client_CancelPatchJob] +// [END osconfig_v1_generated_OsConfigService_CancelPatchJob_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/CreatePatchDeployment/main.go b/internal/generated/snippets/osconfig/apiv1/Client/CreatePatchDeployment/main.go index 1e98057cf65..3f31112ac73 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/CreatePatchDeployment/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/CreatePatchDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_CreatePatchDeployment] +// [START osconfig_v1_generated_OsConfigService_CreatePatchDeployment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1_Client_CreatePatchDeployment] +// [END osconfig_v1_generated_OsConfigService_CreatePatchDeployment_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/DeletePatchDeployment/main.go b/internal/generated/snippets/osconfig/apiv1/Client/DeletePatchDeployment/main.go index 909266581b7..0f85ee57d1b 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/DeletePatchDeployment/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/DeletePatchDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_DeletePatchDeployment] +// [START osconfig_v1_generated_OsConfigService_DeletePatchDeployment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1_Client_DeletePatchDeployment] +// [END osconfig_v1_generated_OsConfigService_DeletePatchDeployment_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/ExecutePatchJob/main.go b/internal/generated/snippets/osconfig/apiv1/Client/ExecutePatchJob/main.go index 93ef6947377..5f5a645e6d1 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/ExecutePatchJob/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/ExecutePatchJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_ExecutePatchJob] +// [START osconfig_v1_generated_OsConfigService_ExecutePatchJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1_Client_ExecutePatchJob] +// [END osconfig_v1_generated_OsConfigService_ExecutePatchJob_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/GetPatchDeployment/main.go b/internal/generated/snippets/osconfig/apiv1/Client/GetPatchDeployment/main.go index ab2e4b5394e..8c8cdc68017 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/GetPatchDeployment/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/GetPatchDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_GetPatchDeployment] +// [START osconfig_v1_generated_OsConfigService_GetPatchDeployment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1_Client_GetPatchDeployment] +// [END osconfig_v1_generated_OsConfigService_GetPatchDeployment_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/GetPatchJob/main.go b/internal/generated/snippets/osconfig/apiv1/Client/GetPatchJob/main.go index 5ba8f0284cd..6f2a8b722c9 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/GetPatchJob/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/GetPatchJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_GetPatchJob] +// [START osconfig_v1_generated_OsConfigService_GetPatchJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1_Client_GetPatchJob] +// [END osconfig_v1_generated_OsConfigService_GetPatchJob_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/ListPatchDeployments/main.go b/internal/generated/snippets/osconfig/apiv1/Client/ListPatchDeployments/main.go index 87a3245b6cc..d38b0d91404 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/ListPatchDeployments/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/ListPatchDeployments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_ListPatchDeployments] +// [START osconfig_v1_generated_OsConfigService_ListPatchDeployments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1_Client_ListPatchDeployments] +// [END osconfig_v1_generated_OsConfigService_ListPatchDeployments_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobInstanceDetails/main.go b/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobInstanceDetails/main.go index 72ce5e33522..a4c9f245c5d 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobInstanceDetails/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobInstanceDetails/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_ListPatchJobInstanceDetails] +// [START osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1_Client_ListPatchJobInstanceDetails] +// [END osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobs/main.go b/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobs/main.go index c0469d39d7b..6918ea972c3 100644 --- a/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobs/main.go +++ b/internal/generated/snippets/osconfig/apiv1/Client/ListPatchJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1_Client_ListPatchJobs] +// [START osconfig_v1_generated_OsConfigService_ListPatchJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1_Client_ListPatchJobs] +// [END osconfig_v1_generated_OsConfigService_ListPatchJobs_sync] diff --git a/internal/generated/snippets/osconfig/apiv1/Client/NewClient/main.go b/internal/generated/snippets/osconfig/apiv1/Client/NewClient/main.go deleted file mode 100644 index c0f1bd56bd0..00000000000 --- a/internal/generated/snippets/osconfig/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START osconfig_generated_osconfig_apiv1_NewClient] - -package main - -import ( - "context" - - osconfig "cloud.google.com/go/osconfig/apiv1" -) - -func main() { - ctx := context.Background() - c, err := osconfig.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END osconfig_generated_osconfig_apiv1_NewClient] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/CancelPatchJob/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/CancelPatchJob/main.go index 5685731743d..c5326b7658a 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/CancelPatchJob/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/CancelPatchJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_CancelPatchJob] +// [START osconfig_v1beta_generated_OsConfigService_CancelPatchJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_CancelPatchJob] +// [END osconfig_v1beta_generated_OsConfigService_CancelPatchJob_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/CreateGuestPolicy/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/CreateGuestPolicy/main.go index abe085e15eb..8c04c609058 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/CreateGuestPolicy/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/CreateGuestPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_CreateGuestPolicy] +// [START osconfig_v1beta_generated_OsConfigService_CreateGuestPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_CreateGuestPolicy] +// [END osconfig_v1beta_generated_OsConfigService_CreateGuestPolicy_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/CreatePatchDeployment/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/CreatePatchDeployment/main.go index 3c91f39f41a..ca4687239f4 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/CreatePatchDeployment/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/CreatePatchDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_CreatePatchDeployment] +// [START osconfig_v1beta_generated_OsConfigService_CreatePatchDeployment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_CreatePatchDeployment] +// [END osconfig_v1beta_generated_OsConfigService_CreatePatchDeployment_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/DeleteGuestPolicy/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/DeleteGuestPolicy/main.go index 1c4d3c5bd90..89c015ce02a 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/DeleteGuestPolicy/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/DeleteGuestPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_DeleteGuestPolicy] +// [START osconfig_v1beta_generated_OsConfigService_DeleteGuestPolicy_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1beta_Client_DeleteGuestPolicy] +// [END osconfig_v1beta_generated_OsConfigService_DeleteGuestPolicy_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/DeletePatchDeployment/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/DeletePatchDeployment/main.go index 60f71876d09..2c68ef748ed 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/DeletePatchDeployment/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/DeletePatchDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_DeletePatchDeployment] +// [START osconfig_v1beta_generated_OsConfigService_DeletePatchDeployment_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1beta_Client_DeletePatchDeployment] +// [END osconfig_v1beta_generated_OsConfigService_DeletePatchDeployment_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/ExecutePatchJob/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/ExecutePatchJob/main.go index ad6422873e4..e72359620e0 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/ExecutePatchJob/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/ExecutePatchJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_ExecutePatchJob] +// [START osconfig_v1beta_generated_OsConfigService_ExecutePatchJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_ExecutePatchJob] +// [END osconfig_v1beta_generated_OsConfigService_ExecutePatchJob_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/GetGuestPolicy/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/GetGuestPolicy/main.go index 7efeb72818e..d6dbd0d1e19 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/GetGuestPolicy/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/GetGuestPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_GetGuestPolicy] +// [START osconfig_v1beta_generated_OsConfigService_GetGuestPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_GetGuestPolicy] +// [END osconfig_v1beta_generated_OsConfigService_GetGuestPolicy_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchDeployment/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchDeployment/main.go index ed7f5c819a2..829a3009d50 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchDeployment/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchDeployment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_GetPatchDeployment] +// [START osconfig_v1beta_generated_OsConfigService_GetPatchDeployment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_GetPatchDeployment] +// [END osconfig_v1beta_generated_OsConfigService_GetPatchDeployment_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchJob/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchJob/main.go index 6bc792f95ba..77b477bd5c0 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchJob/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/GetPatchJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_GetPatchJob] +// [START osconfig_v1beta_generated_OsConfigService_GetPatchJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_GetPatchJob] +// [END osconfig_v1beta_generated_OsConfigService_GetPatchJob_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/ListGuestPolicies/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/ListGuestPolicies/main.go index 10420e439f4..f3cdd62647d 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/ListGuestPolicies/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/ListGuestPolicies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_ListGuestPolicies] +// [START osconfig_v1beta_generated_OsConfigService_ListGuestPolicies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1beta_Client_ListGuestPolicies] +// [END osconfig_v1beta_generated_OsConfigService_ListGuestPolicies_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchDeployments/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchDeployments/main.go index 4257aa6bbe7..9463d2a08b2 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchDeployments/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchDeployments/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_ListPatchDeployments] +// [START osconfig_v1beta_generated_OsConfigService_ListPatchDeployments_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1beta_Client_ListPatchDeployments] +// [END osconfig_v1beta_generated_OsConfigService_ListPatchDeployments_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobInstanceDetails/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobInstanceDetails/main.go index 4ca57929309..ce33b0cbee3 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobInstanceDetails/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobInstanceDetails/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_ListPatchJobInstanceDetails] +// [START osconfig_v1beta_generated_OsConfigService_ListPatchJobInstanceDetails_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1beta_Client_ListPatchJobInstanceDetails] +// [END osconfig_v1beta_generated_OsConfigService_ListPatchJobInstanceDetails_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobs/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobs/main.go index e4deb732c79..f733596eca8 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobs/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/ListPatchJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_ListPatchJobs] +// [START osconfig_v1beta_generated_OsConfigService_ListPatchJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END osconfig_generated_osconfig_apiv1beta_Client_ListPatchJobs] +// [END osconfig_v1beta_generated_OsConfigService_ListPatchJobs_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go index 3fd15bc8419..9f69a34eb60 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/LookupEffectiveGuestPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_LookupEffectiveGuestPolicy] +// [START osconfig_v1beta_generated_OsConfigService_LookupEffectiveGuestPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_LookupEffectiveGuestPolicy] +// [END osconfig_v1beta_generated_OsConfigService_LookupEffectiveGuestPolicy_sync] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/NewClient/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/NewClient/main.go deleted file mode 100644 index edecbf3cfbf..00000000000 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START osconfig_generated_osconfig_apiv1beta_NewClient] - -package main - -import ( - "context" - - osconfig "cloud.google.com/go/osconfig/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := osconfig.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END osconfig_generated_osconfig_apiv1beta_NewClient] diff --git a/internal/generated/snippets/osconfig/apiv1beta/Client/UpdateGuestPolicy/main.go b/internal/generated/snippets/osconfig/apiv1beta/Client/UpdateGuestPolicy/main.go index f1808708e06..e9c47b05dad 100644 --- a/internal/generated/snippets/osconfig/apiv1beta/Client/UpdateGuestPolicy/main.go +++ b/internal/generated/snippets/osconfig/apiv1beta/Client/UpdateGuestPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START osconfig_generated_osconfig_apiv1beta_Client_UpdateGuestPolicy] +// [START osconfig_v1beta_generated_OsConfigService_UpdateGuestPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END osconfig_generated_osconfig_apiv1beta_Client_UpdateGuestPolicy] +// [END osconfig_v1beta_generated_OsConfigService_UpdateGuestPolicy_sync] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/DeletePosixAccount/main.go b/internal/generated/snippets/oslogin/apiv1/Client/DeletePosixAccount/main.go index 537f55ceacb..e4a4a38b907 100644 --- a/internal/generated/snippets/oslogin/apiv1/Client/DeletePosixAccount/main.go +++ b/internal/generated/snippets/oslogin/apiv1/Client/DeletePosixAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1_Client_DeletePosixAccount] +// [START oslogin_v1_generated_OsLoginService_DeletePosixAccount_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END oslogin_generated_oslogin_apiv1_Client_DeletePosixAccount] +// [END oslogin_v1_generated_OsLoginService_DeletePosixAccount_sync] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/DeleteSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1/Client/DeleteSshPublicKey/main.go index aacf2a6f557..df467dcb5fb 100644 --- a/internal/generated/snippets/oslogin/apiv1/Client/DeleteSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1/Client/DeleteSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1_Client_DeleteSshPublicKey] +// [START oslogin_v1_generated_OsLoginService_DeleteSshPublicKey_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END oslogin_generated_oslogin_apiv1_Client_DeleteSshPublicKey] +// [END oslogin_v1_generated_OsLoginService_DeleteSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/GetLoginProfile/main.go b/internal/generated/snippets/oslogin/apiv1/Client/GetLoginProfile/main.go index 7cf1de17f38..0fbf4738b9f 100644 --- a/internal/generated/snippets/oslogin/apiv1/Client/GetLoginProfile/main.go +++ b/internal/generated/snippets/oslogin/apiv1/Client/GetLoginProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1_Client_GetLoginProfile] +// [START oslogin_v1_generated_OsLoginService_GetLoginProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1_Client_GetLoginProfile] +// [END oslogin_v1_generated_OsLoginService_GetLoginProfile_sync] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/GetSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1/Client/GetSshPublicKey/main.go index a01936ed431..15d948b2b64 100644 --- a/internal/generated/snippets/oslogin/apiv1/Client/GetSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1/Client/GetSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1_Client_GetSshPublicKey] +// [START oslogin_v1_generated_OsLoginService_GetSshPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1_Client_GetSshPublicKey] +// [END oslogin_v1_generated_OsLoginService_GetSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/ImportSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1/Client/ImportSshPublicKey/main.go index 237525c3227..3ae204d661e 100644 --- a/internal/generated/snippets/oslogin/apiv1/Client/ImportSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1/Client/ImportSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1_Client_ImportSshPublicKey] +// [START oslogin_v1_generated_OsLoginService_ImportSshPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1_Client_ImportSshPublicKey] +// [END oslogin_v1_generated_OsLoginService_ImportSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/NewClient/main.go b/internal/generated/snippets/oslogin/apiv1/Client/NewClient/main.go deleted file mode 100644 index f9c547bad71..00000000000 --- a/internal/generated/snippets/oslogin/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START oslogin_generated_oslogin_apiv1_NewClient] - -package main - -import ( - "context" - - oslogin "cloud.google.com/go/oslogin/apiv1" -) - -func main() { - ctx := context.Background() - c, err := oslogin.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END oslogin_generated_oslogin_apiv1_NewClient] diff --git a/internal/generated/snippets/oslogin/apiv1/Client/UpdateSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1/Client/UpdateSshPublicKey/main.go index 4a4e8660e31..3c3219c2282 100644 --- a/internal/generated/snippets/oslogin/apiv1/Client/UpdateSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1/Client/UpdateSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1_Client_UpdateSshPublicKey] +// [START oslogin_v1_generated_OsLoginService_UpdateSshPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1_Client_UpdateSshPublicKey] +// [END oslogin_v1_generated_OsLoginService_UpdateSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/DeletePosixAccount/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/DeletePosixAccount/main.go index 5476db4a657..a34f045fcfb 100644 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/DeletePosixAccount/main.go +++ b/internal/generated/snippets/oslogin/apiv1beta/Client/DeletePosixAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1beta_Client_DeletePosixAccount] +// [START oslogin_v1beta_generated_OsLoginService_DeletePosixAccount_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END oslogin_generated_oslogin_apiv1beta_Client_DeletePosixAccount] +// [END oslogin_v1beta_generated_OsLoginService_DeletePosixAccount_sync] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/DeleteSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/DeleteSshPublicKey/main.go index 699955170e7..3be36c107ff 100644 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/DeleteSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1beta/Client/DeleteSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1beta_Client_DeleteSshPublicKey] +// [START oslogin_v1beta_generated_OsLoginService_DeleteSshPublicKey_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END oslogin_generated_oslogin_apiv1beta_Client_DeleteSshPublicKey] +// [END oslogin_v1beta_generated_OsLoginService_DeleteSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/GetLoginProfile/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/GetLoginProfile/main.go index 3cade36be32..4ee77eff95c 100644 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/GetLoginProfile/main.go +++ b/internal/generated/snippets/oslogin/apiv1beta/Client/GetLoginProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1beta_Client_GetLoginProfile] +// [START oslogin_v1beta_generated_OsLoginService_GetLoginProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1beta_Client_GetLoginProfile] +// [END oslogin_v1beta_generated_OsLoginService_GetLoginProfile_sync] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/GetSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/GetSshPublicKey/main.go index 518f3eb8a6e..5cc5461c4de 100644 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/GetSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1beta/Client/GetSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1beta_Client_GetSshPublicKey] +// [START oslogin_v1beta_generated_OsLoginService_GetSshPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1beta_Client_GetSshPublicKey] +// [END oslogin_v1beta_generated_OsLoginService_GetSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/ImportSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/ImportSshPublicKey/main.go index 94527c18e8f..75ab4c315cb 100644 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/ImportSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1beta/Client/ImportSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1beta_Client_ImportSshPublicKey] +// [START oslogin_v1beta_generated_OsLoginService_ImportSshPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1beta_Client_ImportSshPublicKey] +// [END oslogin_v1beta_generated_OsLoginService_ImportSshPublicKey_sync] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/NewClient/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/NewClient/main.go deleted file mode 100644 index 03db45f7159..00000000000 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START oslogin_generated_oslogin_apiv1beta_NewClient] - -package main - -import ( - "context" - - oslogin "cloud.google.com/go/oslogin/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := oslogin.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END oslogin_generated_oslogin_apiv1beta_NewClient] diff --git a/internal/generated/snippets/oslogin/apiv1beta/Client/UpdateSshPublicKey/main.go b/internal/generated/snippets/oslogin/apiv1beta/Client/UpdateSshPublicKey/main.go index 918aeebe8ff..e555e4f5b66 100644 --- a/internal/generated/snippets/oslogin/apiv1beta/Client/UpdateSshPublicKey/main.go +++ b/internal/generated/snippets/oslogin/apiv1beta/Client/UpdateSshPublicKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START oslogin_generated_oslogin_apiv1beta_Client_UpdateSshPublicKey] +// [START oslogin_v1beta_generated_OsLoginService_UpdateSshPublicKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END oslogin_generated_oslogin_apiv1beta_Client_UpdateSshPublicKey] +// [END oslogin_v1beta_generated_OsLoginService_UpdateSshPublicKey_sync] diff --git a/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/NewPhishingProtectionServiceV1Beta1Client/main.go b/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/NewPhishingProtectionServiceV1Beta1Client/main.go deleted file mode 100644 index 35e7c38cc79..00000000000 --- a/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/NewPhishingProtectionServiceV1Beta1Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START phishingprotection_generated_phishingprotection_apiv1beta1_NewPhishingProtectionServiceV1Beta1Client] - -package main - -import ( - "context" - - phishingprotection "cloud.google.com/go/phishingprotection/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := phishingprotection.NewPhishingProtectionServiceV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END phishingprotection_generated_phishingprotection_apiv1beta1_NewPhishingProtectionServiceV1Beta1Client] diff --git a/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/ReportPhishing/main.go b/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/ReportPhishing/main.go index ef18072edff..7a7318ccd64 100644 --- a/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/ReportPhishing/main.go +++ b/internal/generated/snippets/phishingprotection/apiv1beta1/PhishingProtectionServiceV1Beta1Client/ReportPhishing/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START phishingprotection_generated_phishingprotection_apiv1beta1_PhishingProtectionServiceV1Beta1Client_ReportPhishing] +// [START phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END phishingprotection_generated_phishingprotection_apiv1beta1_PhishingProtectionServiceV1Beta1Client_ReportPhishing] +// [END phishingprotection_v1beta1_generated_PhishingProtectionServiceV1Beta1_ReportPhishing_sync] diff --git a/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/NewIamCheckerClient/main.go b/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/NewIamCheckerClient/main.go deleted file mode 100644 index cb8c3e1f1f0..00000000000 --- a/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/NewIamCheckerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START policytroubleshooter_generated_policytroubleshooter_apiv1_NewIamCheckerClient] - -package main - -import ( - "context" - - policytroubleshooter "cloud.google.com/go/policytroubleshooter/apiv1" -) - -func main() { - ctx := context.Background() - c, err := policytroubleshooter.NewIamCheckerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END policytroubleshooter_generated_policytroubleshooter_apiv1_NewIamCheckerClient] diff --git a/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/TroubleshootIamPolicy/main.go b/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/TroubleshootIamPolicy/main.go index 6441d12c6b1..608fa76a0c5 100644 --- a/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/TroubleshootIamPolicy/main.go +++ b/internal/generated/snippets/policytroubleshooter/apiv1/IamCheckerClient/TroubleshootIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START policytroubleshooter_generated_policytroubleshooter_apiv1_IamCheckerClient_TroubleshootIamPolicy] +// [START policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END policytroubleshooter_generated_policytroubleshooter_apiv1_IamCheckerClient_TroubleshootIamPolicy] +// [END policytroubleshooter_v1_generated_IamChecker_TroubleshootIamPolicy_sync] diff --git a/internal/generated/snippets/profiler/Start/main.go b/internal/generated/snippets/profiler/Start/main.go deleted file mode 100644 index 9f95170c816..00000000000 --- a/internal/generated/snippets/profiler/Start/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START profiler_generated_profiler_Start] - -package main - -import ( - "cloud.google.com/go/profiler" -) - -func main() { - if err := profiler.Start(profiler.Config{Service: "my-service", ServiceVersion: "v1"}); err != nil { - //TODO: Handle error. - } -} - -// [END profiler_generated_profiler_Start] diff --git a/internal/generated/snippets/pubsub/Client/CreateSubscription/main.go b/internal/generated/snippets/pubsub/Client/CreateSubscription/main.go deleted file mode 100644 index ebd54aa4a84..00000000000 --- a/internal/generated/snippets/pubsub/Client/CreateSubscription/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_CreateSubscription] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - // Create a new topic with the given name. - topic, err := client.CreateTopic(ctx, "topicName") - if err != nil { - // TODO: Handle error. - } - - // Create a new subscription to the previously created topic - // with the given name. - sub, err := client.CreateSubscription(ctx, "subName", pubsub.SubscriptionConfig{ - Topic: topic, - AckDeadline: 10 * time.Second, - ExpirationPolicy: 25 * time.Hour, - }) - if err != nil { - // TODO: Handle error. - } - - _ = sub // TODO: use the subscription. -} - -// [END pubsub_generated_pubsub_Client_CreateSubscription] diff --git a/internal/generated/snippets/pubsub/Client/CreateSubscription/neverExpire/main.go b/internal/generated/snippets/pubsub/Client/CreateSubscription/neverExpire/main.go deleted file mode 100644 index 1146ff48578..00000000000 --- a/internal/generated/snippets/pubsub/Client/CreateSubscription/neverExpire/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_CreateSubscription_neverExpire] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - // Create a new topic with the given name. - topic, err := client.CreateTopic(ctx, "topicName") - if err != nil { - // TODO: Handle error. - } - - // Create a new subscription to the previously - // created topic and ensure it never expires. - sub, err := client.CreateSubscription(ctx, "subName", pubsub.SubscriptionConfig{ - Topic: topic, - AckDeadline: 10 * time.Second, - ExpirationPolicy: time.Duration(0), - }) - if err != nil { - // TODO: Handle error. - } - _ = sub // TODO: Use the subscription -} - -// [END pubsub_generated_pubsub_Client_CreateSubscription_neverExpire] diff --git a/internal/generated/snippets/pubsub/Client/CreateTopic/main.go b/internal/generated/snippets/pubsub/Client/CreateTopic/main.go deleted file mode 100644 index 1ad91c6b228..00000000000 --- a/internal/generated/snippets/pubsub/Client/CreateTopic/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_CreateTopic] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - // Create a new topic with the given name. - topic, err := client.CreateTopic(ctx, "topicName") - if err != nil { - // TODO: Handle error. - } - - _ = topic // TODO: use the topic. -} - -// [END pubsub_generated_pubsub_Client_CreateTopic] diff --git a/internal/generated/snippets/pubsub/Client/CreateTopicWithConfig/main.go b/internal/generated/snippets/pubsub/Client/CreateTopicWithConfig/main.go deleted file mode 100644 index 4ad4b71970f..00000000000 --- a/internal/generated/snippets/pubsub/Client/CreateTopicWithConfig/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_CreateTopicWithConfig] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - // Create a new topic with the given name and config. - topicConfig := &pubsub.TopicConfig{ - KMSKeyName: "projects/project-id/locations/global/keyRings/my-key-ring/cryptoKeys/my-key", - MessageStoragePolicy: pubsub.MessageStoragePolicy{ - AllowedPersistenceRegions: []string{"us-east1"}, - }, - } - topic, err := client.CreateTopicWithConfig(ctx, "topicName", topicConfig) - if err != nil { - // TODO: Handle error. - } - _ = topic // TODO: use the topic. -} - -// [END pubsub_generated_pubsub_Client_CreateTopicWithConfig] diff --git a/internal/generated/snippets/pubsub/Client/NewClient/main.go b/internal/generated/snippets/pubsub/Client/NewClient/main.go deleted file mode 100644 index 5ae723299a8..00000000000 --- a/internal/generated/snippets/pubsub/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - _, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - // See the other examples to learn how to use the Client. -} - -// [END pubsub_generated_pubsub_NewClient] diff --git a/internal/generated/snippets/pubsub/Client/Snapshots/main.go b/internal/generated/snippets/pubsub/Client/Snapshots/main.go deleted file mode 100644 index 2417409c040..00000000000 --- a/internal/generated/snippets/pubsub/Client/Snapshots/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_Snapshots] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // List all snapshots for the project. - iter := client.Snapshots(ctx) - _ = iter // TODO: iterate using Next. -} - -// [END pubsub_generated_pubsub_Client_Snapshots] diff --git a/internal/generated/snippets/pubsub/Client/Subscriptions/main.go b/internal/generated/snippets/pubsub/Client/Subscriptions/main.go deleted file mode 100644 index ea5d06d7fb1..00000000000 --- a/internal/generated/snippets/pubsub/Client/Subscriptions/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_Subscriptions] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // List all subscriptions of the project. - it := client.Subscriptions(ctx) - _ = it // TODO: iterate using Next. -} - -// [END pubsub_generated_pubsub_Client_Subscriptions] diff --git a/internal/generated/snippets/pubsub/Client/TopicInProject/main.go b/internal/generated/snippets/pubsub/Client/TopicInProject/main.go deleted file mode 100644 index 842fef11181..00000000000 --- a/internal/generated/snippets/pubsub/Client/TopicInProject/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_TopicInProject] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - topic := client.TopicInProject("topicName", "another-project-id") - _ = topic // TODO: use the topic. -} - -// [END pubsub_generated_pubsub_Client_TopicInProject] diff --git a/internal/generated/snippets/pubsub/Client/Topics/main.go b/internal/generated/snippets/pubsub/Client/Topics/main.go deleted file mode 100644 index 528dd962672..00000000000 --- a/internal/generated/snippets/pubsub/Client/Topics/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Client_Topics] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - it := client.Topics(ctx) - _ = it // TODO: iterate using Next. -} - -// [END pubsub_generated_pubsub_Client_Topics] diff --git a/internal/generated/snippets/pubsub/Snapshot/Delete/main.go b/internal/generated/snippets/pubsub/Snapshot/Delete/main.go deleted file mode 100644 index 8d3433aa3a2..00000000000 --- a/internal/generated/snippets/pubsub/Snapshot/Delete/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Snapshot_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - snap := client.Snapshot("snapshotName") - if err := snap.Delete(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Snapshot_Delete] diff --git a/internal/generated/snippets/pubsub/SnapshotConfigIterator/Next/main.go b/internal/generated/snippets/pubsub/SnapshotConfigIterator/Next/main.go deleted file mode 100644 index 03e91cdbb10..00000000000 --- a/internal/generated/snippets/pubsub/SnapshotConfigIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_SnapshotConfigIterator_Next] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // List all snapshots for the project. - iter := client.Snapshots(ctx) - for { - snapConfig, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - _ = snapConfig // TODO: use the SnapshotConfig. - } -} - -// [END pubsub_generated_pubsub_SnapshotConfigIterator_Next] diff --git a/internal/generated/snippets/pubsub/Subscription/Config/main.go b/internal/generated/snippets/pubsub/Subscription/Config/main.go deleted file mode 100644 index 13e7a6982c0..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Config/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Config] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - config, err := sub.Config(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Println(config) -} - -// [END pubsub_generated_pubsub_Subscription_Config] diff --git a/internal/generated/snippets/pubsub/Subscription/CreateSnapshot/main.go b/internal/generated/snippets/pubsub/Subscription/CreateSnapshot/main.go deleted file mode 100644 index 4abbb39beb9..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/CreateSnapshot/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_CreateSnapshot] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - snapConfig, err := sub.CreateSnapshot(ctx, "snapshotName") - if err != nil { - // TODO: Handle error. - } - _ = snapConfig // TODO: Use SnapshotConfig. -} - -// [END pubsub_generated_pubsub_Subscription_CreateSnapshot] diff --git a/internal/generated/snippets/pubsub/Subscription/Delete/main.go b/internal/generated/snippets/pubsub/Subscription/Delete/main.go deleted file mode 100644 index eaeb50e9ccb..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Delete/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - sub := client.Subscription("subName") - if err := sub.Delete(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Subscription_Delete] diff --git a/internal/generated/snippets/pubsub/Subscription/Exists/main.go b/internal/generated/snippets/pubsub/Subscription/Exists/main.go deleted file mode 100644 index 6d6b4d881bb..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Exists/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Exists] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - sub := client.Subscription("subName") - ok, err := sub.Exists(ctx) - if err != nil { - // TODO: Handle error. - } - if !ok { - // Subscription doesn't exist. - } -} - -// [END pubsub_generated_pubsub_Subscription_Exists] diff --git a/internal/generated/snippets/pubsub/Subscription/Receive/main.go b/internal/generated/snippets/pubsub/Subscription/Receive/main.go deleted file mode 100644 index 0683d6b0965..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Receive/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Receive] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - // NOTE: May be called concurrently; synchronize access to shared memory. - m.Ack() - }) - if err != context.Canceled { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Subscription_Receive] diff --git a/internal/generated/snippets/pubsub/Subscription/Receive/maxExtension/main.go b/internal/generated/snippets/pubsub/Subscription/Receive/maxExtension/main.go deleted file mode 100644 index 4d2db8213c6..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Receive/maxExtension/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Receive_maxExtension] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - // This program is expected to process and acknowledge messages in 30 seconds. If - // not, the Pub/Sub API will assume the message is not acknowledged. - sub.ReceiveSettings.MaxExtension = 30 * time.Second - err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - m.Ack() - }) - if err != context.Canceled { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Subscription_Receive_maxExtension] diff --git a/internal/generated/snippets/pubsub/Subscription/Receive/maxOutstanding/main.go b/internal/generated/snippets/pubsub/Subscription/Receive/maxOutstanding/main.go deleted file mode 100644 index 7c8a79cde5f..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Receive/maxOutstanding/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Receive_maxOutstanding] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - sub.ReceiveSettings.MaxOutstandingMessages = 5 - sub.ReceiveSettings.MaxOutstandingBytes = 10e6 - err = sub.Receive(ctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - m.Ack() - }) - if err != context.Canceled { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Subscription_Receive_maxOutstanding] diff --git a/internal/generated/snippets/pubsub/Subscription/SeekToSnapshot/main.go b/internal/generated/snippets/pubsub/Subscription/SeekToSnapshot/main.go deleted file mode 100644 index 0b6084352ca..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/SeekToSnapshot/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_SeekToSnapshot] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - snap := client.Snapshot("snapshotName") - if err := sub.SeekToSnapshot(ctx, snap); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Subscription_SeekToSnapshot] diff --git a/internal/generated/snippets/pubsub/Subscription/SeekToTime/main.go b/internal/generated/snippets/pubsub/Subscription/SeekToTime/main.go deleted file mode 100644 index fcdbb9eb220..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/SeekToTime/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_SeekToTime] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - if err := sub.SeekToTime(ctx, time.Now().Add(-time.Hour)); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Subscription_SeekToTime] diff --git a/internal/generated/snippets/pubsub/Subscription/Update/main.go b/internal/generated/snippets/pubsub/Subscription/Update/main.go deleted file mode 100644 index 2d780f28727..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Update/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Update] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - subConfig, err := sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ - PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"}, - // Make the subscription never expire. - ExpirationPolicy: time.Duration(0), - }) - if err != nil { - // TODO: Handle error. - } - _ = subConfig // TODO: Use SubscriptionConfig. -} - -// [END pubsub_generated_pubsub_Subscription_Update] diff --git a/internal/generated/snippets/pubsub/Subscription/Update/pushConfigAuthenticationMethod/main.go b/internal/generated/snippets/pubsub/Subscription/Update/pushConfigAuthenticationMethod/main.go deleted file mode 100644 index d1e145366e2..00000000000 --- a/internal/generated/snippets/pubsub/Subscription/Update/pushConfigAuthenticationMethod/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Subscription_Update_pushConfigAuthenticationMethod] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - sub := client.Subscription("subName") - subConfig, err := sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{ - PushConfig: &pubsub.PushConfig{ - Endpoint: "https://example.com/push", - AuthenticationMethod: &pubsub.OIDCToken{ - ServiceAccountEmail: "service-account-email", - Audience: "client-12345", - }, - }, - }) - if err != nil { - // TODO: Handle error. - } - _ = subConfig // TODO: Use SubscriptionConfig. -} - -// [END pubsub_generated_pubsub_Subscription_Update_pushConfigAuthenticationMethod] diff --git a/internal/generated/snippets/pubsub/SubscriptionIterator/Next/main.go b/internal/generated/snippets/pubsub/SubscriptionIterator/Next/main.go deleted file mode 100644 index 841046eac41..00000000000 --- a/internal/generated/snippets/pubsub/SubscriptionIterator/Next/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_SubscriptionIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // List all subscriptions of the project. - it := client.Subscriptions(ctx) - for { - sub, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(sub) - } -} - -// [END pubsub_generated_pubsub_SubscriptionIterator_Next] diff --git a/internal/generated/snippets/pubsub/Topic/Delete/main.go b/internal/generated/snippets/pubsub/Topic/Delete/main.go deleted file mode 100644 index 5107c68fbe2..00000000000 --- a/internal/generated/snippets/pubsub/Topic/Delete/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Topic_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - topic := client.Topic("topicName") - if err := topic.Delete(ctx); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsub_Topic_Delete] diff --git a/internal/generated/snippets/pubsub/Topic/Exists/main.go b/internal/generated/snippets/pubsub/Topic/Exists/main.go deleted file mode 100644 index b27701b15a4..00000000000 --- a/internal/generated/snippets/pubsub/Topic/Exists/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Topic_Exists] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - topic := client.Topic("topicName") - ok, err := topic.Exists(ctx) - if err != nil { - // TODO: Handle error. - } - if !ok { - // Topic doesn't exist. - } -} - -// [END pubsub_generated_pubsub_Topic_Exists] diff --git a/internal/generated/snippets/pubsub/Topic/Publish/main.go b/internal/generated/snippets/pubsub/Topic/Publish/main.go deleted file mode 100644 index 11b4aa193f9..00000000000 --- a/internal/generated/snippets/pubsub/Topic/Publish/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Topic_Publish] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - - topic := client.Topic("topicName") - defer topic.Stop() - var results []*pubsub.PublishResult - r := topic.Publish(ctx, &pubsub.Message{ - Data: []byte("hello world"), - }) - results = append(results, r) - // Do other work ... - for _, r := range results { - id, err := r.Get(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Printf("Published a message with a message ID: %s\n", id) - } -} - -// [END pubsub_generated_pubsub_Topic_Publish] diff --git a/internal/generated/snippets/pubsub/Topic/Subscriptions/main.go b/internal/generated/snippets/pubsub/Topic/Subscriptions/main.go deleted file mode 100644 index 5b0f8d84eb2..00000000000 --- a/internal/generated/snippets/pubsub/Topic/Subscriptions/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Topic_Subscriptions] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - topic := client.Topic("topic-name") - // List all subscriptions of the topic (maybe of multiple projects). - for subs := topic.Subscriptions(ctx); ; { - sub, err := subs.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - _ = sub // TODO: use the subscription. - } -} - -// [END pubsub_generated_pubsub_Topic_Subscriptions] diff --git a/internal/generated/snippets/pubsub/Topic/Update/main.go b/internal/generated/snippets/pubsub/Topic/Update/main.go deleted file mode 100644 index 0a5f6588e89..00000000000 --- a/internal/generated/snippets/pubsub/Topic/Update/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Topic_Update] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error.V - } - topic := client.Topic("topic-name") - topicConfig, err := topic.Update(ctx, pubsub.TopicConfigToUpdate{ - MessageStoragePolicy: &pubsub.MessageStoragePolicy{ - AllowedPersistenceRegions: []string{ - "asia-east1", "asia-northeast1", "asia-southeast1", "australia-southeast1", - "europe-north1", "europe-west1", "europe-west2", "europe-west3", "europe-west4", - "us-central1", "us-central2", "us-east1", "us-east4", "us-west1", "us-west2"}, - }, - }) - if err != nil { - // TODO: Handle error. - } - _ = topicConfig // TODO: Use TopicConfig -} - -// [END pubsub_generated_pubsub_Topic_Update] diff --git a/internal/generated/snippets/pubsub/Topic/Update/resetMessageStoragePolicy/main.go b/internal/generated/snippets/pubsub/Topic/Update/resetMessageStoragePolicy/main.go deleted file mode 100644 index d106fd9364b..00000000000 --- a/internal/generated/snippets/pubsub/Topic/Update/resetMessageStoragePolicy/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_Topic_Update_resetMessageStoragePolicy] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error.V - } - topic := client.Topic("topic-name") - topicConfig, err := topic.Update(ctx, pubsub.TopicConfigToUpdate{ - // Just use a non-nil MessageStoragePolicy without any fields. - MessageStoragePolicy: &pubsub.MessageStoragePolicy{}, - }) - if err != nil { - // TODO: Handle error. - } - _ = topicConfig // TODO: Use TopicConfig -} - -// [END pubsub_generated_pubsub_Topic_Update_resetMessageStoragePolicy] diff --git a/internal/generated/snippets/pubsub/TopicIterator/Next/main.go b/internal/generated/snippets/pubsub/TopicIterator/Next/main.go deleted file mode 100644 index 81b5645f44b..00000000000 --- a/internal/generated/snippets/pubsub/TopicIterator/Next/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_TopicIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := pubsub.NewClient(ctx, "project-id") - if err != nil { - // TODO: Handle error. - } - // List all topics. - it := client.Topics(ctx) - for { - t, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(t) - } -} - -// [END pubsub_generated_pubsub_TopicIterator_Next] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/CreateTopic/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/CreateTopic/main.go index d4dd7abc3a9..43b36a94d68 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/CreateTopic/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/CreateTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_CreateTopic] +// [START pubsub_v1_generated_Publisher_CreateTopic_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_CreateTopic] +// [END pubsub_v1_generated_Publisher_CreateTopic_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/DeleteTopic/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/DeleteTopic/main.go index d504c088c81..43021fe1d29 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/DeleteTopic/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/DeleteTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_DeleteTopic] +// [START pubsub_v1_generated_Publisher_DeleteTopic_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_DeleteTopic] +// [END pubsub_v1_generated_Publisher_DeleteTopic_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/DetachSubscription/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/DetachSubscription/main.go index ddf7d4adb36..e6016223922 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/DetachSubscription/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/DetachSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_DetachSubscription] +// [START pubsub_v1_generated_Publisher_DetachSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_DetachSubscription] +// [END pubsub_v1_generated_Publisher_DetachSubscription_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/GetTopic/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/GetTopic/main.go index 10b584dd100..2585752bd57 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/GetTopic/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/GetTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_GetTopic] +// [START pubsub_v1_generated_Publisher_GetTopic_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_GetTopic] +// [END pubsub_v1_generated_Publisher_GetTopic_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSnapshots/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSnapshots/main.go index 30edd24979d..0dafdd7292a 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSnapshots/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSnapshots/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_ListTopicSnapshots] +// [START pubsub_v1_generated_Publisher_ListTopicSnapshots_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_ListTopicSnapshots] +// [END pubsub_v1_generated_Publisher_ListTopicSnapshots_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSubscriptions/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSubscriptions/main.go index fe94b4507b0..f4d1ab0d17d 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSubscriptions/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopicSubscriptions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_ListTopicSubscriptions] +// [START pubsub_v1_generated_Publisher_ListTopicSubscriptions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_ListTopicSubscriptions] +// [END pubsub_v1_generated_Publisher_ListTopicSubscriptions_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopics/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopics/main.go index f6ff6661bff..3fe17ad8378 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopics/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/ListTopics/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_ListTopics] +// [START pubsub_v1_generated_Publisher_ListTopics_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_ListTopics] +// [END pubsub_v1_generated_Publisher_ListTopics_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/NewPublisherClient/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/NewPublisherClient/main.go deleted file mode 100644 index 8c80315759e..00000000000 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/NewPublisherClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_apiv1_NewPublisherClient] - -package main - -import ( - "context" - - pubsub "cloud.google.com/go/pubsub/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsub.NewPublisherClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsub_generated_pubsub_apiv1_NewPublisherClient] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/Publish/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/Publish/main.go index b395b506862..a0d16a4e4b3 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/Publish/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/Publish/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_Publish] +// [START pubsub_v1_generated_Publisher_Publish_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_Publish] +// [END pubsub_v1_generated_Publisher_Publish_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/PublisherClient/UpdateTopic/main.go b/internal/generated/snippets/pubsub/apiv1/PublisherClient/UpdateTopic/main.go index 8cb7e6c897a..f6c845a3aa6 100644 --- a/internal/generated/snippets/pubsub/apiv1/PublisherClient/UpdateTopic/main.go +++ b/internal/generated/snippets/pubsub/apiv1/PublisherClient/UpdateTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_PublisherClient_UpdateTopic] +// [START pubsub_v1_generated_Publisher_UpdateTopic_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_PublisherClient_UpdateTopic] +// [END pubsub_v1_generated_Publisher_UpdateTopic_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/CreateSchema/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/CreateSchema/main.go index bbcc171bfc1..f93ff5f2fbd 100644 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/CreateSchema/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SchemaClient/CreateSchema/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SchemaClient_CreateSchema] +// [START pubsub_v1_generated_SchemaService_CreateSchema_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SchemaClient_CreateSchema] +// [END pubsub_v1_generated_SchemaService_CreateSchema_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/DeleteSchema/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/DeleteSchema/main.go index 49ce9fded36..5bdcf9394f6 100644 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/DeleteSchema/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SchemaClient/DeleteSchema/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SchemaClient_DeleteSchema] +// [START pubsub_v1_generated_SchemaService_DeleteSchema_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SchemaClient_DeleteSchema] +// [END pubsub_v1_generated_SchemaService_DeleteSchema_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/GetSchema/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/GetSchema/main.go index 858f6542fa4..0003772f9d0 100644 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/GetSchema/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SchemaClient/GetSchema/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SchemaClient_GetSchema] +// [START pubsub_v1_generated_SchemaService_GetSchema_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SchemaClient_GetSchema] +// [END pubsub_v1_generated_SchemaService_GetSchema_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/ListSchemas/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/ListSchemas/main.go index aea8b9b440d..f723bca64f6 100644 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/ListSchemas/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SchemaClient/ListSchemas/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SchemaClient_ListSchemas] +// [START pubsub_v1_generated_SchemaService_ListSchemas_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SchemaClient_ListSchemas] +// [END pubsub_v1_generated_SchemaService_ListSchemas_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/NewSchemaClient/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/NewSchemaClient/main.go deleted file mode 100644 index 204e1e7e059..00000000000 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/NewSchemaClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_apiv1_NewSchemaClient] - -package main - -import ( - "context" - - pubsub "cloud.google.com/go/pubsub/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsub.NewSchemaClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsub_generated_pubsub_apiv1_NewSchemaClient] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateMessage/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateMessage/main.go index 79fa093a25d..348167bc1c7 100644 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateMessage/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateMessage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SchemaClient_ValidateMessage] +// [START pubsub_v1_generated_SchemaService_ValidateMessage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SchemaClient_ValidateMessage] +// [END pubsub_v1_generated_SchemaService_ValidateMessage_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateSchema/main.go b/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateSchema/main.go index 2dd3fe34cad..4b804d0d42f 100644 --- a/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateSchema/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SchemaClient/ValidateSchema/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SchemaClient_ValidateSchema] +// [START pubsub_v1_generated_SchemaService_ValidateSchema_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SchemaClient_ValidateSchema] +// [END pubsub_v1_generated_SchemaService_ValidateSchema_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Acknowledge/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Acknowledge/main.go index 84bf022bdc2..d52aaa0a71b 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Acknowledge/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Acknowledge/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_Acknowledge] +// [START pubsub_v1_generated_Subscriber_Acknowledge_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_Acknowledge] +// [END pubsub_v1_generated_Subscriber_Acknowledge_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSnapshot/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSnapshot/main.go index 370d3ec5659..6804508e68d 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSnapshot/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSnapshot/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_CreateSnapshot] +// [START pubsub_v1_generated_Subscriber_CreateSnapshot_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_CreateSnapshot] +// [END pubsub_v1_generated_Subscriber_CreateSnapshot_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSubscription/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSubscription/main.go index 9dc20f34c8a..50dc6372d28 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSubscription/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/CreateSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_CreateSubscription] +// [START pubsub_v1_generated_Subscriber_CreateSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_CreateSubscription] +// [END pubsub_v1_generated_Subscriber_CreateSubscription_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSnapshot/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSnapshot/main.go index 4ae99aaf97d..0b694b2d17a 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSnapshot/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSnapshot/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_DeleteSnapshot] +// [START pubsub_v1_generated_Subscriber_DeleteSnapshot_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_DeleteSnapshot] +// [END pubsub_v1_generated_Subscriber_DeleteSnapshot_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSubscription/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSubscription/main.go index 5e88b435802..4e944f4aa0e 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSubscription/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/DeleteSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_DeleteSubscription] +// [START pubsub_v1_generated_Subscriber_DeleteSubscription_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_DeleteSubscription] +// [END pubsub_v1_generated_Subscriber_DeleteSubscription_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSnapshot/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSnapshot/main.go index e20f53e6107..2fe8ee41a71 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSnapshot/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSnapshot/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_GetSnapshot] +// [START pubsub_v1_generated_Subscriber_GetSnapshot_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_GetSnapshot] +// [END pubsub_v1_generated_Subscriber_GetSnapshot_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSubscription/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSubscription/main.go index 8b314ece49e..090d2e9859c 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSubscription/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/GetSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_GetSubscription] +// [START pubsub_v1_generated_Subscriber_GetSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_GetSubscription] +// [END pubsub_v1_generated_Subscriber_GetSubscription_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSnapshots/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSnapshots/main.go index 27da7db23da..14aa0193011 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSnapshots/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSnapshots/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_ListSnapshots] +// [START pubsub_v1_generated_Subscriber_ListSnapshots_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_ListSnapshots] +// [END pubsub_v1_generated_Subscriber_ListSnapshots_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSubscriptions/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSubscriptions/main.go index 9f47a4ea564..45e5ab2bbee 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSubscriptions/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ListSubscriptions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_ListSubscriptions] +// [START pubsub_v1_generated_Subscriber_ListSubscriptions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_ListSubscriptions] +// [END pubsub_v1_generated_Subscriber_ListSubscriptions_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyAckDeadline/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyAckDeadline/main.go index da49b9a2950..99f8d039791 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyAckDeadline/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyAckDeadline/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_ModifyAckDeadline] +// [START pubsub_v1_generated_Subscriber_ModifyAckDeadline_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_ModifyAckDeadline] +// [END pubsub_v1_generated_Subscriber_ModifyAckDeadline_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyPushConfig/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyPushConfig/main.go index d8844ceee8c..54ba434ce72 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyPushConfig/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/ModifyPushConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_ModifyPushConfig] +// [START pubsub_v1_generated_Subscriber_ModifyPushConfig_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_ModifyPushConfig] +// [END pubsub_v1_generated_Subscriber_ModifyPushConfig_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/NewSubscriberClient/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/NewSubscriberClient/main.go deleted file mode 100644 index e45e4fe4a28..00000000000 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/NewSubscriberClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_apiv1_NewSubscriberClient] - -package main - -import ( - "context" - - pubsub "cloud.google.com/go/pubsub/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsub.NewSubscriberClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsub_generated_pubsub_apiv1_NewSubscriberClient] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/lengthyClientProcessing/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/lengthyClientProcessing/main.go index 591cbda4520..0097044cc57 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/lengthyClientProcessing/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/lengthyClientProcessing/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_Pull_lengthyClientProcessing] +// [START pubsub_v1_generated_Subscriber_Pull_sync_lengthyClientProcessing] package main @@ -107,4 +107,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_Pull_lengthyClientProcessing] +// [END pubsub_v1_generated_Subscriber_Pull_sync_lengthyClientProcessing] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/main.go index cc0e228fe59..aeae521581b 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Pull/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_Pull] +// [START pubsub_v1_generated_Subscriber_Pull_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_Pull] +// [END pubsub_v1_generated_Subscriber_Pull_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Seek/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Seek/main.go index cf034342b7b..0c9ef4a43ee 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Seek/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/Seek/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_Seek] +// [START pubsub_v1_generated_Subscriber_Seek_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_Seek] +// [END pubsub_v1_generated_Subscriber_Seek_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/StreamingPull/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/StreamingPull/main.go index b2c25306e05..0e34d2cac1a 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/StreamingPull/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/StreamingPull/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_StreamingPull] +// [START pubsub_v1_generated_Subscriber_StreamingPull_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_StreamingPull] +// [END pubsub_v1_generated_Subscriber_StreamingPull_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSnapshot/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSnapshot/main.go index 96453f5c149..320eb2dab17 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSnapshot/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSnapshot/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_UpdateSnapshot] +// [START pubsub_v1_generated_Subscriber_UpdateSnapshot_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_UpdateSnapshot] +// [END pubsub_v1_generated_Subscriber_UpdateSnapshot_sync] diff --git a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSubscription/main.go b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSubscription/main.go index 8f4666850f1..6cd118504cd 100644 --- a/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSubscription/main.go +++ b/internal/generated/snippets/pubsub/apiv1/SubscriberClient/UpdateSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsub_generated_pubsub_apiv1_SubscriberClient_UpdateSubscription] +// [START pubsub_v1_generated_Subscriber_UpdateSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsub_generated_pubsub_apiv1_SubscriberClient_UpdateSubscription] +// [END pubsub_v1_generated_Subscriber_UpdateSubscription_sync] diff --git a/internal/generated/snippets/pubsub/pstest/Server/NewServer/main.go b/internal/generated/snippets/pubsub/pstest/Server/NewServer/main.go deleted file mode 100644 index 91d8209233f..00000000000 --- a/internal/generated/snippets/pubsub/pstest/Server/NewServer/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsub_pstest_NewServer] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsub/pstest" - "google.golang.org/api/option" - "google.golang.org/grpc" -) - -func main() { - ctx := context.Background() - // Start a fake server running locally. - srv := pstest.NewServer() - defer srv.Close() - // Connect to the server without using TLS. - conn, err := grpc.Dial(srv.Addr, grpc.WithInsecure()) - if err != nil { - // TODO: Handle error. - } - defer conn.Close() - // Use the connection when creating a pubsub client. - client, err := pubsub.NewClient(ctx, "project", option.WithGRPCConn(conn)) - if err != nil { - // TODO: Handle error. - } - defer client.Close() - _ = client // TODO: Use the client. -} - -// [END pubsub_generated_pubsub_pstest_NewServer] diff --git a/internal/generated/snippets/pubsublite/AdminClient/CreateSubscription/main.go b/internal/generated/snippets/pubsublite/AdminClient/CreateSubscription/main.go deleted file mode 100644 index f173d02edb2..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/CreateSubscription/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_CreateSubscription] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsublite" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the topic and subscription. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - subscriptionConfig := pubsublite.SubscriptionConfig{ - Name: "projects/my-project/locations/zone/subscriptions/my-subscription", - Topic: "projects/my-project/locations/zone/topics/my-topic", - // Do not wait for a published message to be successfully written to storage - // before delivering it to subscribers. - DeliveryRequirement: pubsublite.DeliverImmediately, - } - _, err = admin.CreateSubscription(ctx, subscriptionConfig) - if err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_AdminClient_CreateSubscription] diff --git a/internal/generated/snippets/pubsublite/AdminClient/CreateTopic/main.go b/internal/generated/snippets/pubsublite/AdminClient/CreateTopic/main.go deleted file mode 100644 index 359cff58207..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/CreateTopic/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_CreateTopic] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsublite" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the topic. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - const gib = 1 << 30 - topicConfig := pubsublite.TopicConfig{ - Name: "projects/my-project/locations/zone/topics/my-topic", - PartitionCount: 2, // Must be at least 1. - PublishCapacityMiBPerSec: 4, // Must be 4-16 MiB/s. - SubscribeCapacityMiBPerSec: 8, // Must be 4-32 MiB/s. - PerPartitionBytes: 30 * gib, // Must be 30 GiB-10 TiB. - // Retain messages indefinitely as long as there is available storage. - RetentionDuration: pubsublite.InfiniteRetention, - } - _, err = admin.CreateTopic(ctx, topicConfig) - if err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_AdminClient_CreateTopic] diff --git a/internal/generated/snippets/pubsublite/AdminClient/DeleteSubscription/main.go b/internal/generated/snippets/pubsublite/AdminClient/DeleteSubscription/main.go deleted file mode 100644 index e25dff4ed57..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/DeleteSubscription/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_DeleteSubscription] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsublite" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the subscription. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - const subscription = "projects/my-project/locations/zone/subscriptions/my-subscription" - if err := admin.DeleteSubscription(ctx, subscription); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_AdminClient_DeleteSubscription] diff --git a/internal/generated/snippets/pubsublite/AdminClient/DeleteTopic/main.go b/internal/generated/snippets/pubsublite/AdminClient/DeleteTopic/main.go deleted file mode 100644 index 7495f505541..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/DeleteTopic/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_DeleteTopic] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsublite" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the topic. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - const topic = "projects/my-project/locations/zone/topics/my-topic" - if err := admin.DeleteTopic(ctx, topic); err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_AdminClient_DeleteTopic] diff --git a/internal/generated/snippets/pubsublite/AdminClient/Subscriptions/main.go b/internal/generated/snippets/pubsublite/AdminClient/Subscriptions/main.go deleted file mode 100644 index 408979f2e7f..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/Subscriptions/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_Subscriptions] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsublite" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone below. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - // List the configs of all subscriptions in the given zone for the project. - it := admin.Subscriptions(ctx, "projects/my-project/locations/zone") - for { - subscriptionConfig, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(subscriptionConfig) - } -} - -// [END pubsub_generated_pubsublite_AdminClient_Subscriptions] diff --git a/internal/generated/snippets/pubsublite/AdminClient/TopicSubscriptions/main.go b/internal/generated/snippets/pubsublite/AdminClient/TopicSubscriptions/main.go deleted file mode 100644 index 89a1fe9141e..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/TopicSubscriptions/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_TopicSubscriptions] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsublite" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the topic. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - // List the paths of all subscriptions of a topic. - const topic = "projects/my-project/locations/zone/topics/my-topic" - it := admin.TopicSubscriptions(ctx, topic) - for { - subscriptionPath, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(subscriptionPath) - } -} - -// [END pubsub_generated_pubsublite_AdminClient_TopicSubscriptions] diff --git a/internal/generated/snippets/pubsublite/AdminClient/Topics/main.go b/internal/generated/snippets/pubsublite/AdminClient/Topics/main.go deleted file mode 100644 index e448efaa650..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/Topics/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_Topics] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsublite" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone below. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - // List the configs of all topics in the given zone for the project. - it := admin.Topics(ctx, "projects/my-project/locations/zone") - for { - topicConfig, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(topicConfig) - } -} - -// [END pubsub_generated_pubsublite_AdminClient_Topics] diff --git a/internal/generated/snippets/pubsublite/AdminClient/UpdateSubscription/main.go b/internal/generated/snippets/pubsublite/AdminClient/UpdateSubscription/main.go deleted file mode 100644 index 33c79965071..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/UpdateSubscription/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_UpdateSubscription] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsublite" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the subscription. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - updateConfig := pubsublite.SubscriptionConfigToUpdate{ - Name: "projects/my-project/locations/zone/subscriptions/my-subscription", - // Deliver a published message to subscribers after it has been successfully - // written to storage. - DeliveryRequirement: pubsublite.DeliverAfterStored, - } - _, err = admin.UpdateSubscription(ctx, updateConfig) - if err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_AdminClient_UpdateSubscription] diff --git a/internal/generated/snippets/pubsublite/AdminClient/UpdateTopic/main.go b/internal/generated/snippets/pubsublite/AdminClient/UpdateTopic/main.go deleted file mode 100644 index 11b41b5be10..00000000000 --- a/internal/generated/snippets/pubsublite/AdminClient/UpdateTopic/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_AdminClient_UpdateTopic] - -package main - -import ( - "context" - "time" - - "cloud.google.com/go/pubsublite" -) - -func main() { - ctx := context.Background() - // NOTE: region must correspond to the zone of the topic. - admin, err := pubsublite.NewAdminClient(ctx, "region") - if err != nil { - // TODO: Handle error. - } - - updateConfig := pubsublite.TopicConfigToUpdate{ - Name: "projects/my-project/locations/zone/topics/my-topic", - PartitionCount: 3, // Only increases currently supported. - PublishCapacityMiBPerSec: 8, - SubscribeCapacityMiBPerSec: 16, - RetentionDuration: 24 * time.Hour, // Garbage collect messages older than 24 hours. - } - _, err = admin.UpdateTopic(ctx, updateConfig) - if err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_AdminClient_UpdateTopic] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateSubscription/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateSubscription/main.go index fb5a985c1df..977d16e85d9 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateSubscription/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_CreateSubscription] +// [START pubsublite_v1_generated_AdminService_CreateSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_CreateSubscription] +// [END pubsublite_v1_generated_AdminService_CreateSubscription_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateTopic/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateTopic/main.go index 4fffc28c958..f1fe395cff6 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateTopic/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_CreateTopic] +// [START pubsublite_v1_generated_AdminService_CreateTopic_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_CreateTopic] +// [END pubsublite_v1_generated_AdminService_CreateTopic_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteSubscription/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteSubscription/main.go index e9804ec2d1f..26ccc721b54 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteSubscription/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_DeleteSubscription] +// [START pubsublite_v1_generated_AdminService_DeleteSubscription_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_DeleteSubscription] +// [END pubsublite_v1_generated_AdminService_DeleteSubscription_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteTopic/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteTopic/main.go index 1b77bca6737..3cd5f11719e 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteTopic/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_DeleteTopic] +// [START pubsublite_v1_generated_AdminService_DeleteTopic_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_DeleteTopic] +// [END pubsublite_v1_generated_AdminService_DeleteTopic_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetSubscription/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetSubscription/main.go index dcd417494da..904dc4ddf60 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetSubscription/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_GetSubscription] +// [START pubsublite_v1_generated_AdminService_GetSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_GetSubscription] +// [END pubsublite_v1_generated_AdminService_GetSubscription_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopic/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopic/main.go index 9845cb376a3..1d54a3499f4 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopic/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_GetTopic] +// [START pubsublite_v1_generated_AdminService_GetTopic_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_GetTopic] +// [END pubsublite_v1_generated_AdminService_GetTopic_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopicPartitions/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopicPartitions/main.go index d22a7d2e143..28538e1c008 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopicPartitions/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/GetTopicPartitions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_GetTopicPartitions] +// [START pubsublite_v1_generated_AdminService_GetTopicPartitions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_GetTopicPartitions] +// [END pubsublite_v1_generated_AdminService_GetTopicPartitions_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListSubscriptions/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListSubscriptions/main.go index 36e121f24a9..385759a20f8 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListSubscriptions/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListSubscriptions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_ListSubscriptions] +// [START pubsublite_v1_generated_AdminService_ListSubscriptions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_ListSubscriptions] +// [END pubsublite_v1_generated_AdminService_ListSubscriptions_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopicSubscriptions/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopicSubscriptions/main.go index a6475592d1e..00948f47bbe 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopicSubscriptions/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopicSubscriptions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_ListTopicSubscriptions] +// [START pubsublite_v1_generated_AdminService_ListTopicSubscriptions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_ListTopicSubscriptions] +// [END pubsublite_v1_generated_AdminService_ListTopicSubscriptions_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopics/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopics/main.go index 28ff1fa83d8..d673f784e1a 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopics/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/ListTopics/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_ListTopics] +// [START pubsublite_v1_generated_AdminService_ListTopics_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_ListTopics] +// [END pubsublite_v1_generated_AdminService_ListTopics_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/NewAdminClient/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/NewAdminClient/main.go deleted file mode 100644 index 3f8089d23d2..00000000000 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/NewAdminClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsublite_generated_pubsublite_apiv1_NewAdminClient] - -package main - -import ( - "context" - - pubsublite "cloud.google.com/go/pubsublite/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsublite.NewAdminClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsublite_generated_pubsublite_apiv1_NewAdminClient] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateSubscription/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateSubscription/main.go index ae22f2ce6c0..d16a83347b5 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateSubscription/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateSubscription/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_UpdateSubscription] +// [START pubsublite_v1_generated_AdminService_UpdateSubscription_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_UpdateSubscription] +// [END pubsublite_v1_generated_AdminService_UpdateSubscription_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateTopic/main.go b/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateTopic/main.go index 91a2fdf021f..c241aa434f1 100644 --- a/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateTopic/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateTopic/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_AdminClient_UpdateTopic] +// [START pubsublite_v1_generated_AdminService_UpdateTopic_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_AdminClient_UpdateTopic] +// [END pubsublite_v1_generated_AdminService_UpdateTopic_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/CursorClient/CommitCursor/main.go b/internal/generated/snippets/pubsublite/apiv1/CursorClient/CommitCursor/main.go index d159634ccc7..8029bc5236d 100644 --- a/internal/generated/snippets/pubsublite/apiv1/CursorClient/CommitCursor/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/CursorClient/CommitCursor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_CursorClient_CommitCursor] +// [START pubsublite_v1_generated_CursorService_CommitCursor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_CursorClient_CommitCursor] +// [END pubsublite_v1_generated_CursorService_CommitCursor_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/CursorClient/ListPartitionCursors/main.go b/internal/generated/snippets/pubsublite/apiv1/CursorClient/ListPartitionCursors/main.go index cae5177793a..1446c60ef5c 100644 --- a/internal/generated/snippets/pubsublite/apiv1/CursorClient/ListPartitionCursors/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/CursorClient/ListPartitionCursors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_CursorClient_ListPartitionCursors] +// [START pubsublite_v1_generated_CursorService_ListPartitionCursors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_CursorClient_ListPartitionCursors] +// [END pubsublite_v1_generated_CursorService_ListPartitionCursors_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/CursorClient/NewCursorClient/main.go b/internal/generated/snippets/pubsublite/apiv1/CursorClient/NewCursorClient/main.go deleted file mode 100644 index 84a5a367782..00000000000 --- a/internal/generated/snippets/pubsublite/apiv1/CursorClient/NewCursorClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsublite_generated_pubsublite_apiv1_NewCursorClient] - -package main - -import ( - "context" - - pubsublite "cloud.google.com/go/pubsublite/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsublite.NewCursorClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsublite_generated_pubsublite_apiv1_NewCursorClient] diff --git a/internal/generated/snippets/pubsublite/apiv1/CursorClient/StreamingCommitCursor/main.go b/internal/generated/snippets/pubsublite/apiv1/CursorClient/StreamingCommitCursor/main.go index 38bc0d1fae4..a52a9cbb74b 100644 --- a/internal/generated/snippets/pubsublite/apiv1/CursorClient/StreamingCommitCursor/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/CursorClient/StreamingCommitCursor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_CursorClient_StreamingCommitCursor] +// [START pubsublite_v1_generated_CursorService_StreamingCommitCursor_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_CursorClient_StreamingCommitCursor] +// [END pubsublite_v1_generated_CursorService_StreamingCommitCursor_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/AssignPartitions/main.go b/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/AssignPartitions/main.go index 9f17da6fd50..49adf2a074d 100644 --- a/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/AssignPartitions/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/AssignPartitions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_PartitionAssignmentClient_AssignPartitions] +// [START pubsublite_v1_generated_PartitionAssignmentService_AssignPartitions_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_PartitionAssignmentClient_AssignPartitions] +// [END pubsublite_v1_generated_PartitionAssignmentService_AssignPartitions_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/NewPartitionAssignmentClient/main.go b/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/NewPartitionAssignmentClient/main.go deleted file mode 100644 index b4f3f1b3437..00000000000 --- a/internal/generated/snippets/pubsublite/apiv1/PartitionAssignmentClient/NewPartitionAssignmentClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsublite_generated_pubsublite_apiv1_NewPartitionAssignmentClient] - -package main - -import ( - "context" - - pubsublite "cloud.google.com/go/pubsublite/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsublite.NewPartitionAssignmentClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsublite_generated_pubsublite_apiv1_NewPartitionAssignmentClient] diff --git a/internal/generated/snippets/pubsublite/apiv1/PublisherClient/NewPublisherClient/main.go b/internal/generated/snippets/pubsublite/apiv1/PublisherClient/NewPublisherClient/main.go deleted file mode 100644 index 8583c982f59..00000000000 --- a/internal/generated/snippets/pubsublite/apiv1/PublisherClient/NewPublisherClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsublite_generated_pubsublite_apiv1_NewPublisherClient] - -package main - -import ( - "context" - - pubsublite "cloud.google.com/go/pubsublite/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsublite.NewPublisherClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsublite_generated_pubsublite_apiv1_NewPublisherClient] diff --git a/internal/generated/snippets/pubsublite/apiv1/PublisherClient/Publish/main.go b/internal/generated/snippets/pubsublite/apiv1/PublisherClient/Publish/main.go index 2289dd6b972..09b95b15e34 100644 --- a/internal/generated/snippets/pubsublite/apiv1/PublisherClient/Publish/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/PublisherClient/Publish/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_PublisherClient_Publish] +// [START pubsublite_v1_generated_PublisherService_Publish_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_PublisherClient_Publish] +// [END pubsublite_v1_generated_PublisherService_Publish_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/NewSubscriberClient/main.go b/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/NewSubscriberClient/main.go deleted file mode 100644 index c80cd61ef4d..00000000000 --- a/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/NewSubscriberClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsublite_generated_pubsublite_apiv1_NewSubscriberClient] - -package main - -import ( - "context" - - pubsublite "cloud.google.com/go/pubsublite/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsublite.NewSubscriberClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsublite_generated_pubsublite_apiv1_NewSubscriberClient] diff --git a/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/Subscribe/main.go b/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/Subscribe/main.go index 5e3f92a0e93..505ccb749d0 100644 --- a/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/Subscribe/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/SubscriberClient/Subscribe/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_SubscriberClient_Subscribe] +// [START pubsublite_v1_generated_SubscriberService_Subscribe_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END pubsublite_generated_pubsublite_apiv1_SubscriberClient_Subscribe] +// [END pubsublite_v1_generated_SubscriberService_Subscribe_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeHeadCursor/main.go b/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeHeadCursor/main.go index 4c3dc2b5ede..9fe38cdb196 100644 --- a/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeHeadCursor/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeHeadCursor/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_TopicStatsClient_ComputeHeadCursor] +// [START pubsublite_v1_generated_TopicStatsService_ComputeHeadCursor_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_TopicStatsClient_ComputeHeadCursor] +// [END pubsublite_v1_generated_TopicStatsService_ComputeHeadCursor_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeMessageStats/main.go b/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeMessageStats/main.go index 10b571a127f..22fa3a11e05 100644 --- a/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeMessageStats/main.go +++ b/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/ComputeMessageStats/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START pubsublite_generated_pubsublite_apiv1_TopicStatsClient_ComputeMessageStats] +// [START pubsublite_v1_generated_TopicStatsService_ComputeMessageStats_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END pubsublite_generated_pubsublite_apiv1_TopicStatsClient_ComputeMessageStats] +// [END pubsublite_v1_generated_TopicStatsService_ComputeMessageStats_sync] diff --git a/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/NewTopicStatsClient/main.go b/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/NewTopicStatsClient/main.go deleted file mode 100644 index 72b2f4bd44a..00000000000 --- a/internal/generated/snippets/pubsublite/apiv1/TopicStatsClient/NewTopicStatsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsublite_generated_pubsublite_apiv1_NewTopicStatsClient] - -package main - -import ( - "context" - - pubsublite "cloud.google.com/go/pubsublite/apiv1" -) - -func main() { - ctx := context.Background() - c, err := pubsublite.NewTopicStatsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END pubsublite_generated_pubsublite_apiv1_NewTopicStatsClient] diff --git a/internal/generated/snippets/pubsublite/pscompat/MessageMetadata/ParseMessageMetadata/publisher/main.go b/internal/generated/snippets/pubsublite/pscompat/MessageMetadata/ParseMessageMetadata/publisher/main.go deleted file mode 100644 index 3fc65063f16..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/MessageMetadata/ParseMessageMetadata/publisher/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_ParseMessageMetadata_publisher] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const topic = "projects/my-project/locations/zone/topics/my-topic" - publisher, err := pscompat.NewPublisherClient(ctx, topic) - if err != nil { - // TODO: Handle error. - } - defer publisher.Stop() - - result := publisher.Publish(ctx, &pubsub.Message{Data: []byte("payload")}) - id, err := result.Get(ctx) - if err != nil { - // TODO: Handle error. - } - metadata, err := pscompat.ParseMessageMetadata(id) - if err != nil { - // TODO: Handle error. - } - fmt.Printf("Published message to partition %d with offset %d\n", metadata.Partition, metadata.Offset) -} - -// [END pubsub_generated_pubsublite_pscompat_ParseMessageMetadata_publisher] diff --git a/internal/generated/snippets/pubsublite/pscompat/MessageMetadata/ParseMessageMetadata/subscriber/main.go b/internal/generated/snippets/pubsublite/pscompat/MessageMetadata/ParseMessageMetadata/subscriber/main.go deleted file mode 100644 index bb3952a9e4f..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/MessageMetadata/ParseMessageMetadata/subscriber/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_ParseMessageMetadata_subscriber] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const subscription = "projects/my-project/locations/zone/subscriptions/my-subscription" - subscriber, err := pscompat.NewSubscriberClient(ctx, subscription) - if err != nil { - // TODO: Handle error. - } - err = subscriber.Receive(ctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - m.Ack() - metadata, err := pscompat.ParseMessageMetadata(m.ID) - if err != nil { - // TODO: Handle error. - } - fmt.Printf("Received message from partition %d with offset %d\n", metadata.Partition, metadata.Offset) - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END pubsub_generated_pubsublite_pscompat_ParseMessageMetadata_subscriber] diff --git a/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/batchingSettings/main.go b/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/batchingSettings/main.go deleted file mode 100644 index 0e107636150..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/batchingSettings/main.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_PublisherClient_Publish_batchingSettings] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const topic = "projects/my-project/locations/zone/topics/my-topic" - settings := pscompat.PublishSettings{ - DelayThreshold: 50 * time.Millisecond, - CountThreshold: 200, - BufferedByteLimit: 5e8, - } - publisher, err := pscompat.NewPublisherClientWithSettings(ctx, topic, settings) - if err != nil { - // TODO: Handle error. - } - defer publisher.Stop() - - var results []*pubsub.PublishResult - r := publisher.Publish(ctx, &pubsub.Message{ - Data: []byte("hello world"), - }) - results = append(results, r) - // Publish more messages ... - - var publishFailed bool - for _, r := range results { - id, err := r.Get(ctx) - if err != nil { - // TODO: Handle error. - publishFailed = true - continue - } - fmt.Printf("Published a message with a message ID: %s\n", id) - } - - // NOTE: A failed PublishResult indicates that the publisher client - // encountered a fatal error and has permanently terminated. After the fatal - // error has been resolved, a new publisher client instance must be created to - // republish failed messages. - if publishFailed { - fmt.Printf("Publisher client terminated due to error: %v\n", publisher.Error()) - } -} - -// [END pubsub_generated_pubsublite_pscompat_PublisherClient_Publish_batchingSettings] diff --git a/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/errorHandling/main.go b/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/errorHandling/main.go deleted file mode 100644 index bc7cd89fd0d..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/errorHandling/main.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_PublisherClient_Publish_errorHandling] - -package main - -import ( - "context" - "fmt" - "sync" - "time" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" - "golang.org/x/sync/errgroup" - "golang.org/x/xerrors" -) - -func main() { - ctx := context.Background() - const topic = "projects/my-project/locations/zone/topics/my-topic" - settings := pscompat.PublishSettings{ - // The PublisherClient will terminate when it cannot connect to backends for - // more than 10 minutes. - Timeout: 10 * time.Minute, - // Sets a conservative publish buffer byte limit, per partition. - BufferedByteLimit: 1e8, - } - publisher, err := pscompat.NewPublisherClientWithSettings(ctx, topic, settings) - if err != nil { - // TODO: Handle error. - } - defer publisher.Stop() - - var toRepublish []*pubsub.Message - var mu sync.Mutex - g := new(errgroup.Group) - - for i := 0; i < 10; i++ { - msg := &pubsub.Message{ - Data: []byte(fmt.Sprintf("message-%d", i)), - } - result := publisher.Publish(ctx, msg) - - g.Go(func() error { - id, err := result.Get(ctx) - if err != nil { - // NOTE: A failed PublishResult indicates that the publisher client has - // permanently terminated. A new publisher client instance must be - // created to republish failed messages. - fmt.Printf("Publish error: %v\n", err) - // Oversized messages cannot be published. - if !xerrors.Is(err, pscompat.ErrOversizedMessage) { - mu.Lock() - toRepublish = append(toRepublish, msg) - mu.Unlock() - } - return err - } - fmt.Printf("Published a message with a message ID: %s\n", id) - return nil - }) - } - if err := g.Wait(); err != nil { - fmt.Printf("Publisher client terminated due to error: %v\n", publisher.Error()) - switch { - case xerrors.Is(publisher.Error(), pscompat.ErrBackendUnavailable): - // TODO: Create a new publisher client to republish failed messages. - case xerrors.Is(publisher.Error(), pscompat.ErrOverflow): - // TODO: Create a new publisher client to republish failed messages. - // Throttle publishing. Note that backend unavailability can also cause - // buffer overflow before the ErrBackendUnavailable error. - default: - // TODO: Inspect and handle fatal error. - } - } -} - -// [END pubsub_generated_pubsublite_pscompat_PublisherClient_Publish_errorHandling] diff --git a/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/main.go b/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/main.go deleted file mode 100644 index 1b06faefa69..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/PublisherClient/Publish/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_PublisherClient_Publish] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const topic = "projects/my-project/locations/zone/topics/my-topic" - publisher, err := pscompat.NewPublisherClient(ctx, topic) - if err != nil { - // TODO: Handle error. - } - defer publisher.Stop() - - var results []*pubsub.PublishResult - r := publisher.Publish(ctx, &pubsub.Message{ - Data: []byte("hello world"), - }) - results = append(results, r) - // Publish more messages ... - - var publishFailed bool - for _, r := range results { - id, err := r.Get(ctx) - if err != nil { - // TODO: Handle error. - publishFailed = true - continue - } - fmt.Printf("Published a message with a message ID: %s\n", id) - } - - // NOTE: A failed PublishResult indicates that the publisher client - // encountered a fatal error and has permanently terminated. After the fatal - // error has been resolved, a new publisher client instance must be created to - // republish failed messages. - if publishFailed { - fmt.Printf("Publisher client terminated due to error: %v\n", publisher.Error()) - } -} - -// [END pubsub_generated_pubsublite_pscompat_PublisherClient_Publish] diff --git a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/errorHandling/main.go b/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/errorHandling/main.go deleted file mode 100644 index 23de9476f59..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/errorHandling/main.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive_errorHandling] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" - "golang.org/x/xerrors" -) - -func main() { - ctx := context.Background() - const subscription = "projects/my-project/locations/zone/subscriptions/my-subscription" - settings := pscompat.ReceiveSettings{ - // The SubscriberClient will terminate when it cannot connect to backends - // for more than 5 minutes. - Timeout: 5 * time.Minute, - } - subscriber, err := pscompat.NewSubscriberClientWithSettings(ctx, subscription, settings) - if err != nil { - // TODO: Handle error. - } - - for { - cctx, cancel := context.WithCancel(ctx) - err = subscriber.Receive(cctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - // NOTE: May be called concurrently; synchronize access to shared memory. - m.Ack() - }) - if err != nil { - fmt.Printf("Subscriber client stopped receiving due to error: %v\n", err) - if xerrors.Is(err, pscompat.ErrBackendUnavailable) { - // TODO: Alert if necessary. Receive can be retried. - } else { - // TODO: Handle fatal error. - break - } - } - - // Call cancel from the receiver callback or another goroutine to stop - // receiving. - cancel() - } -} - -// [END pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive_errorHandling] diff --git a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/main.go b/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/main.go deleted file mode 100644 index c5f8dd70991..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const subscription = "projects/my-project/locations/zone/subscriptions/my-subscription" - subscriber, err := pscompat.NewSubscriberClient(ctx, subscription) - if err != nil { - // TODO: Handle error. - } - cctx, cancel := context.WithCancel(ctx) - err = subscriber.Receive(cctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - // NOTE: May be called concurrently; synchronize access to shared memory. - m.Ack() - }) - if err != nil { - // TODO: Handle error. - } - - // Call cancel from the receiver callback or another goroutine to stop - // receiving. - cancel() -} - -// [END pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive] diff --git a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/manualPartitionAssignment/main.go b/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/manualPartitionAssignment/main.go deleted file mode 100644 index 6476349dce9..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/manualPartitionAssignment/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive_manualPartitionAssignment] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const subscription = "projects/my-project/locations/zone/subscriptions/my-subscription" - settings := pscompat.ReceiveSettings{ - // NOTE: The corresponding topic must have 2 or more partitions. - Partitions: []int{0, 1}, - } - subscriber, err := pscompat.NewSubscriberClientWithSettings(ctx, subscription, settings) - if err != nil { - // TODO: Handle error. - } - cctx, cancel := context.WithCancel(ctx) - err = subscriber.Receive(cctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - // NOTE: May be called concurrently; synchronize access to shared memory. - m.Ack() - }) - if err != nil { - // TODO: Handle error. - } - - // Call cancel from the receiver callback or another goroutine to stop - // receiving. - cancel() -} - -// [END pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive_manualPartitionAssignment] diff --git a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/maxOutstanding/main.go b/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/maxOutstanding/main.go deleted file mode 100644 index 3019e63b183..00000000000 --- a/internal/generated/snippets/pubsublite/pscompat/SubscriberClient/Receive/maxOutstanding/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive_maxOutstanding] - -package main - -import ( - "context" - - "cloud.google.com/go/pubsub" - "cloud.google.com/go/pubsublite/pscompat" -) - -func main() { - ctx := context.Background() - const subscription = "projects/my-project/locations/zone/subscriptions/my-subscription" - settings := pscompat.ReceiveSettings{ - MaxOutstandingMessages: 5, - MaxOutstandingBytes: 10e6, - } - subscriber, err := pscompat.NewSubscriberClientWithSettings(ctx, subscription, settings) - if err != nil { - // TODO: Handle error. - } - cctx, cancel := context.WithCancel(ctx) - err = subscriber.Receive(cctx, func(ctx context.Context, m *pubsub.Message) { - // TODO: Handle message. - // NOTE: May be called concurrently; synchronize access to shared memory. - m.Ack() - }) - if err != nil { - // TODO: Handle error. - } - - // Call cancel from the receiver callback or another goroutine to stop - // receiving. - cancel() -} - -// [END pubsub_generated_pubsublite_pscompat_SubscriberClient_Receive_maxOutstanding] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/AnnotateAssessment/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/AnnotateAssessment/main.go index d5f9d817438..c2c4907473c 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/AnnotateAssessment/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/AnnotateAssessment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_AnnotateAssessment] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_AnnotateAssessment] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_AnnotateAssessment_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateAssessment/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateAssessment/main.go index 79988190c4f..29a057509b0 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateAssessment/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateAssessment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_CreateAssessment] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_CreateAssessment] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateAssessment_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateKey/main.go index 782e7f2121e..aa2b93b4131 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/CreateKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_CreateKey] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_CreateKey] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_CreateKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/DeleteKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/DeleteKey/main.go index 7e3d150c3e4..c70cba2c5d2 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/DeleteKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/DeleteKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_DeleteKey] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_DeleteKey] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_DeleteKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/GetKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/GetKey/main.go index 4c5f3b61567..ee4ef161a1b 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/GetKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/GetKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_GetKey] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_GetKey] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_GetKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListKeys/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListKeys/main.go index b0814dc22a6..44f6a73857f 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListKeys/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListKeys/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_ListKeys] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_ListKeys] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListKeys_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/NewClient/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/NewClient/main.go deleted file mode 100644 index 33df96d0884..00000000000 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_NewClient] - -package main - -import ( - "context" - - recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/apiv1" -) - -func main() { - ctx := context.Background() - c, err := recaptchaenterprise.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_NewClient] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/UpdateKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/UpdateKey/main.go index 590c88ca8a7..576c2d031e5 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/UpdateKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/UpdateKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_UpdateKey] +// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1_Client_UpdateKey] +// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_UpdateKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/AnnotateAssessment/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/AnnotateAssessment/main.go index 4d4644d0791..81a1ac3bc54 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/AnnotateAssessment/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/AnnotateAssessment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_AnnotateAssessment] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_AnnotateAssessment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_AnnotateAssessment] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_AnnotateAssessment_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateAssessment/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateAssessment/main.go index f2f90cdc32f..6b17e35340a 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateAssessment/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateAssessment/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_CreateAssessment] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_CreateAssessment_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_CreateAssessment] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_CreateAssessment_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateKey/main.go index f516c12bec0..49903678c47 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/CreateKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_CreateKey] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_CreateKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_CreateKey] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_CreateKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/DeleteKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/DeleteKey/main.go index d95ded37889..1164237eb4b 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/DeleteKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/DeleteKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_DeleteKey] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_DeleteKey_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_DeleteKey] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_DeleteKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/GetKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/GetKey/main.go index 92fc4dfac10..2628e2175b2 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/GetKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/GetKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_GetKey] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_GetKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_GetKey] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_GetKey_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/ListKeys/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/ListKeys/main.go index 0c272957345..13964b2b490 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/ListKeys/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/ListKeys/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_ListKeys] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_ListKeys_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_ListKeys] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_ListKeys_sync] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/NewRecaptchaEnterpriseServiceV1Beta1Client/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/NewRecaptchaEnterpriseServiceV1Beta1Client/main.go deleted file mode 100644 index 8c0895a3762..00000000000 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/NewRecaptchaEnterpriseServiceV1Beta1Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_NewRecaptchaEnterpriseServiceV1Beta1Client] - -package main - -import ( - "context" - - recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := recaptchaenterprise.NewRecaptchaEnterpriseServiceV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_NewRecaptchaEnterpriseServiceV1Beta1Client] diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/UpdateKey/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/UpdateKey/main.go index 8dd81cf5d9d..488cad5637b 100644 --- a/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/UpdateKey/main.go +++ b/internal/generated/snippets/recaptchaenterprise/apiv1beta1/RecaptchaEnterpriseServiceV1Beta1Client/UpdateKey/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_UpdateKey] +// [START recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_UpdateKey_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recaptchaenterprise_generated_recaptchaenterprise_apiv1beta1_RecaptchaEnterpriseServiceV1Beta1Client_UpdateKey] +// [END recaptchaenterprise_v1beta1_generated_RecaptchaEnterpriseServiceV1Beta1_UpdateKey_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/CreateCatalogItem/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/CreateCatalogItem/main.go index 97a3242ed97..3b87cb11b77 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/CreateCatalogItem/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/CreateCatalogItem/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_CreateCatalogItem] +// [START recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_CreateCatalogItem] +// [END recommendationengine_v1beta1_generated_CatalogService_CreateCatalogItem_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/DeleteCatalogItem/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/DeleteCatalogItem/main.go index b3eb4ae0856..d07d1678df2 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/DeleteCatalogItem/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/DeleteCatalogItem/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_DeleteCatalogItem] +// [START recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_DeleteCatalogItem] +// [END recommendationengine_v1beta1_generated_CatalogService_DeleteCatalogItem_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/GetCatalogItem/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/GetCatalogItem/main.go index a11a2906c56..bd8c92bda55 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/GetCatalogItem/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/GetCatalogItem/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_GetCatalogItem] +// [START recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_GetCatalogItem] +// [END recommendationengine_v1beta1_generated_CatalogService_GetCatalogItem_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ImportCatalogItems/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ImportCatalogItems/main.go index 313bafa504b..087e24ec096 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ImportCatalogItems/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ImportCatalogItems/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_ImportCatalogItems] +// [START recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_ImportCatalogItems] +// [END recommendationengine_v1beta1_generated_CatalogService_ImportCatalogItems_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ListCatalogItems/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ListCatalogItems/main.go index 51eb61e77da..9a8b83d35ff 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ListCatalogItems/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/ListCatalogItems/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_ListCatalogItems] +// [START recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_ListCatalogItems] +// [END recommendationengine_v1beta1_generated_CatalogService_ListCatalogItems_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/NewCatalogClient/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/NewCatalogClient/main.go deleted file mode 100644 index 93762f0c716..00000000000 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/NewCatalogClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recommendationengine_generated_recommendationengine_apiv1beta1_NewCatalogClient] - -package main - -import ( - "context" - - recommendationengine "cloud.google.com/go/recommendationengine/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := recommendationengine.NewCatalogClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recommendationengine_generated_recommendationengine_apiv1beta1_NewCatalogClient] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/UpdateCatalogItem/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/UpdateCatalogItem/main.go index 768c7cf76b7..412aef41f30 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/UpdateCatalogItem/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/CatalogClient/UpdateCatalogItem/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_UpdateCatalogItem] +// [START recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_CatalogClient_UpdateCatalogItem] +// [END recommendationengine_v1beta1_generated_CatalogService_UpdateCatalogItem_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/CreatePredictionApiKeyRegistration/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/CreatePredictionApiKeyRegistration/main.go index 2115ad5bebd..4ba4b5e0eb3 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/CreatePredictionApiKeyRegistration/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/CreatePredictionApiKeyRegistration/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_PredictionApiKeyRegistryClient_CreatePredictionApiKeyRegistration] +// [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_PredictionApiKeyRegistryClient_CreatePredictionApiKeyRegistration] +// [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_CreatePredictionApiKeyRegistration_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/DeletePredictionApiKeyRegistration/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/DeletePredictionApiKeyRegistration/main.go index da79a3ac974..37fc02e8720 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/DeletePredictionApiKeyRegistration/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/DeletePredictionApiKeyRegistration/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_PredictionApiKeyRegistryClient_DeletePredictionApiKeyRegistration] +// [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_PredictionApiKeyRegistryClient_DeletePredictionApiKeyRegistration] +// [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_DeletePredictionApiKeyRegistration_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/ListPredictionApiKeyRegistrations/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/ListPredictionApiKeyRegistrations/main.go index cb68899510b..0ca7608c21a 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/ListPredictionApiKeyRegistrations/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/ListPredictionApiKeyRegistrations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_PredictionApiKeyRegistryClient_ListPredictionApiKeyRegistrations] +// [START recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_PredictionApiKeyRegistryClient_ListPredictionApiKeyRegistrations] +// [END recommendationengine_v1beta1_generated_PredictionApiKeyRegistry_ListPredictionApiKeyRegistrations_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/NewPredictionApiKeyRegistryClient/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/NewPredictionApiKeyRegistryClient/main.go deleted file mode 100644 index d5b47f20bd3..00000000000 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionApiKeyRegistryClient/NewPredictionApiKeyRegistryClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recommendationengine_generated_recommendationengine_apiv1beta1_NewPredictionApiKeyRegistryClient] - -package main - -import ( - "context" - - recommendationengine "cloud.google.com/go/recommendationengine/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := recommendationengine.NewPredictionApiKeyRegistryClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recommendationengine_generated_recommendationengine_apiv1beta1_NewPredictionApiKeyRegistryClient] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/NewPredictionClient/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/NewPredictionClient/main.go deleted file mode 100644 index d0cef6f20e9..00000000000 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/NewPredictionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recommendationengine_generated_recommendationengine_apiv1beta1_NewPredictionClient] - -package main - -import ( - "context" - - recommendationengine "cloud.google.com/go/recommendationengine/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := recommendationengine.NewPredictionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recommendationengine_generated_recommendationengine_apiv1beta1_NewPredictionClient] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/Predict/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/Predict/main.go index ffb4193b940..c71c5ac217d 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/Predict/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/PredictionClient/Predict/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_PredictionClient_Predict] +// [START recommendationengine_v1beta1_generated_PredictionService_Predict_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_PredictionClient_Predict] +// [END recommendationengine_v1beta1_generated_PredictionService_Predict_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/CollectUserEvent/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/CollectUserEvent/main.go index 400dd679b02..a248f5ae9dd 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/CollectUserEvent/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/CollectUserEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_CollectUserEvent] +// [START recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_CollectUserEvent] +// [END recommendationengine_v1beta1_generated_UserEventService_CollectUserEvent_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ImportUserEvents/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ImportUserEvents/main.go index 797dcedb527..63c57f2a8ef 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ImportUserEvents/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ImportUserEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_ImportUserEvents] +// [START recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_ImportUserEvents] +// [END recommendationengine_v1beta1_generated_UserEventService_ImportUserEvents_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ListUserEvents/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ListUserEvents/main.go index f3cda51917b..a589e846468 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ListUserEvents/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/ListUserEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_ListUserEvents] +// [START recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_ListUserEvents] +// [END recommendationengine_v1beta1_generated_UserEventService_ListUserEvents_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/NewUserEventClient/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/NewUserEventClient/main.go deleted file mode 100644 index bd72f719647..00000000000 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/NewUserEventClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recommendationengine_generated_recommendationengine_apiv1beta1_NewUserEventClient] - -package main - -import ( - "context" - - recommendationengine "cloud.google.com/go/recommendationengine/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := recommendationengine.NewUserEventClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recommendationengine_generated_recommendationengine_apiv1beta1_NewUserEventClient] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/PurgeUserEvents/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/PurgeUserEvents/main.go index 286a35ff526..f1441aceee5 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/PurgeUserEvents/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/PurgeUserEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_PurgeUserEvents] +// [START recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_PurgeUserEvents] +// [END recommendationengine_v1beta1_generated_UserEventService_PurgeUserEvents_sync] diff --git a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/WriteUserEvent/main.go b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/WriteUserEvent/main.go index 7cccbc17c18..f754e1bb98c 100644 --- a/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/WriteUserEvent/main.go +++ b/internal/generated/snippets/recommendationengine/apiv1beta1/UserEventClient/WriteUserEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_WriteUserEvent] +// [START recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommendationengine_generated_recommendationengine_apiv1beta1_UserEventClient_WriteUserEvent] +// [END recommendationengine_v1beta1_generated_UserEventService_WriteUserEvent_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/GetInsight/main.go b/internal/generated/snippets/recommender/apiv1/Client/GetInsight/main.go index 503a7974284..5a20e350ecb 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/GetInsight/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/GetInsight/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_GetInsight] +// [START recommender_v1_generated_Recommender_GetInsight_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1_Client_GetInsight] +// [END recommender_v1_generated_Recommender_GetInsight_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/GetRecommendation/main.go b/internal/generated/snippets/recommender/apiv1/Client/GetRecommendation/main.go index 8b71135aec0..22ebe8e0280 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/GetRecommendation/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/GetRecommendation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_GetRecommendation] +// [START recommender_v1_generated_Recommender_GetRecommendation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1_Client_GetRecommendation] +// [END recommender_v1_generated_Recommender_GetRecommendation_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/ListInsights/main.go b/internal/generated/snippets/recommender/apiv1/Client/ListInsights/main.go index 422743194fc..d9faf410e12 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/ListInsights/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/ListInsights/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_ListInsights] +// [START recommender_v1_generated_Recommender_ListInsights_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommender_generated_recommender_apiv1_Client_ListInsights] +// [END recommender_v1_generated_Recommender_ListInsights_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/ListRecommendations/main.go b/internal/generated/snippets/recommender/apiv1/Client/ListRecommendations/main.go index 4eacf43f5bc..d80a7f6a8d3 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/ListRecommendations/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/ListRecommendations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_ListRecommendations] +// [START recommender_v1_generated_Recommender_ListRecommendations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommender_generated_recommender_apiv1_Client_ListRecommendations] +// [END recommender_v1_generated_Recommender_ListRecommendations_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/MarkInsightAccepted/main.go b/internal/generated/snippets/recommender/apiv1/Client/MarkInsightAccepted/main.go index 81222c12d41..380b1e324ec 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/MarkInsightAccepted/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/MarkInsightAccepted/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_MarkInsightAccepted] +// [START recommender_v1_generated_Recommender_MarkInsightAccepted_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1_Client_MarkInsightAccepted] +// [END recommender_v1_generated_Recommender_MarkInsightAccepted_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationClaimed/main.go b/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationClaimed/main.go index 13eb63c8351..17893f6cf58 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationClaimed/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationClaimed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_MarkRecommendationClaimed] +// [START recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1_Client_MarkRecommendationClaimed] +// [END recommender_v1_generated_Recommender_MarkRecommendationClaimed_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationFailed/main.go b/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationFailed/main.go index 3e2a136ec77..a896284ddea 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationFailed/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationFailed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_MarkRecommendationFailed] +// [START recommender_v1_generated_Recommender_MarkRecommendationFailed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1_Client_MarkRecommendationFailed] +// [END recommender_v1_generated_Recommender_MarkRecommendationFailed_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationSucceeded/main.go b/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationSucceeded/main.go index c1a25739199..6301751690a 100644 --- a/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationSucceeded/main.go +++ b/internal/generated/snippets/recommender/apiv1/Client/MarkRecommendationSucceeded/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1_Client_MarkRecommendationSucceeded] +// [START recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1_Client_MarkRecommendationSucceeded] +// [END recommender_v1_generated_Recommender_MarkRecommendationSucceeded_sync] diff --git a/internal/generated/snippets/recommender/apiv1/Client/NewClient/main.go b/internal/generated/snippets/recommender/apiv1/Client/NewClient/main.go deleted file mode 100644 index 8d196a5114e..00000000000 --- a/internal/generated/snippets/recommender/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recommender_generated_recommender_apiv1_NewClient] - -package main - -import ( - "context" - - recommender "cloud.google.com/go/recommender/apiv1" -) - -func main() { - ctx := context.Background() - c, err := recommender.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recommender_generated_recommender_apiv1_NewClient] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/GetInsight/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/GetInsight/main.go index e0f9717b41f..e90c52b572c 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/GetInsight/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/GetInsight/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_GetInsight] +// [START recommender_v1beta1_generated_Recommender_GetInsight_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1beta1_Client_GetInsight] +// [END recommender_v1beta1_generated_Recommender_GetInsight_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommendation/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommendation/main.go index b5f256e0f2e..89d555360fe 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommendation/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommendation/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_GetRecommendation] +// [START recommender_v1beta1_generated_Recommender_GetRecommendation_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1beta1_Client_GetRecommendation] +// [END recommender_v1beta1_generated_Recommender_GetRecommendation_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/ListInsights/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/ListInsights/main.go index 04b017d708e..2f8a22ff145 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/ListInsights/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/ListInsights/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_ListInsights] +// [START recommender_v1beta1_generated_Recommender_ListInsights_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommender_generated_recommender_apiv1beta1_Client_ListInsights] +// [END recommender_v1beta1_generated_Recommender_ListInsights_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/ListRecommendations/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/ListRecommendations/main.go index 70b0ba29846..f1cdf8e64bf 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/ListRecommendations/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/ListRecommendations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_ListRecommendations] +// [START recommender_v1beta1_generated_Recommender_ListRecommendations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END recommender_generated_recommender_apiv1beta1_Client_ListRecommendations] +// [END recommender_v1beta1_generated_Recommender_ListRecommendations_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkInsightAccepted/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkInsightAccepted/main.go index daf2cafceac..204e70882fb 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkInsightAccepted/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkInsightAccepted/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_MarkInsightAccepted] +// [START recommender_v1beta1_generated_Recommender_MarkInsightAccepted_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1beta1_Client_MarkInsightAccepted] +// [END recommender_v1beta1_generated_Recommender_MarkInsightAccepted_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationClaimed/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationClaimed/main.go index 484fd728581..33eab37f600 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationClaimed/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationClaimed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_MarkRecommendationClaimed] +// [START recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1beta1_Client_MarkRecommendationClaimed] +// [END recommender_v1beta1_generated_Recommender_MarkRecommendationClaimed_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationFailed/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationFailed/main.go index 05d886ccc93..cd9bc745778 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationFailed/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationFailed/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_MarkRecommendationFailed] +// [START recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1beta1_Client_MarkRecommendationFailed] +// [END recommender_v1beta1_generated_Recommender_MarkRecommendationFailed_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationSucceeded/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationSucceeded/main.go index 62d687664bb..fcaa3bb6593 100644 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationSucceeded/main.go +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/MarkRecommendationSucceeded/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START recommender_generated_recommender_apiv1beta1_Client_MarkRecommendationSucceeded] +// [START recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END recommender_generated_recommender_apiv1beta1_Client_MarkRecommendationSucceeded] +// [END recommender_v1beta1_generated_Recommender_MarkRecommendationSucceeded_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 5e13c782cb2..00000000000 --- a/internal/generated/snippets/recommender/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START recommender_generated_recommender_apiv1beta1_NewClient] - -package main - -import ( - "context" - - recommender "cloud.google.com/go/recommender/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := recommender.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END recommender_generated_recommender_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/CreateInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/CreateInstance/main.go index e5ebc6ec1bf..3a95be19879 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/CreateInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/CreateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_CreateInstance] +// [START redis_v1_generated_CloudRedis_CreateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_CreateInstance] +// [END redis_v1_generated_CloudRedis_CreateInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/DeleteInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/DeleteInstance/main.go index 035b93853ec..1fe6b7fdf83 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/DeleteInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_DeleteInstance] +// [START redis_v1_generated_CloudRedis_DeleteInstance_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END redis_generated_redis_apiv1_CloudRedisClient_DeleteInstance] +// [END redis_v1_generated_CloudRedis_DeleteInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/ExportInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/ExportInstance/main.go index e9df7fd8f05..7997a47278c 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/ExportInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/ExportInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_ExportInstance] +// [START redis_v1_generated_CloudRedis_ExportInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_ExportInstance] +// [END redis_v1_generated_CloudRedis_ExportInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/FailoverInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/FailoverInstance/main.go index 44580e5af73..32b579857f2 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/FailoverInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/FailoverInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_FailoverInstance] +// [START redis_v1_generated_CloudRedis_FailoverInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_FailoverInstance] +// [END redis_v1_generated_CloudRedis_FailoverInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/GetInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/GetInstance/main.go index f5c3ba05b82..7be4fef2309 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/GetInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_GetInstance] +// [START redis_v1_generated_CloudRedis_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_GetInstance] +// [END redis_v1_generated_CloudRedis_GetInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/ImportInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/ImportInstance/main.go index 5b7bfd152f8..99c48021b17 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/ImportInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/ImportInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_ImportInstance] +// [START redis_v1_generated_CloudRedis_ImportInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_ImportInstance] +// [END redis_v1_generated_CloudRedis_ImportInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/ListInstances/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/ListInstances/main.go index 326a946c724..0fd534f06b8 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/ListInstances/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_ListInstances] +// [START redis_v1_generated_CloudRedis_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END redis_generated_redis_apiv1_CloudRedisClient_ListInstances] +// [END redis_v1_generated_CloudRedis_ListInstances_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/NewCloudRedisClient/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/NewCloudRedisClient/main.go deleted file mode 100644 index 1a51f8df2e5..00000000000 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/NewCloudRedisClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START redis_generated_redis_apiv1_NewCloudRedisClient] - -package main - -import ( - "context" - - redis "cloud.google.com/go/redis/apiv1" -) - -func main() { - ctx := context.Background() - c, err := redis.NewCloudRedisClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END redis_generated_redis_apiv1_NewCloudRedisClient] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpdateInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpdateInstance/main.go index f5a1cf23d5b..ced7a3780c0 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpdateInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpdateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_UpdateInstance] +// [START redis_v1_generated_CloudRedis_UpdateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_UpdateInstance] +// [END redis_v1_generated_CloudRedis_UpdateInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpgradeInstance/main.go b/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpgradeInstance/main.go index b2b857f7c9c..fd8e21b6d68 100644 --- a/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpgradeInstance/main.go +++ b/internal/generated/snippets/redis/apiv1/CloudRedisClient/UpgradeInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1_CloudRedisClient_UpgradeInstance] +// [START redis_v1_generated_CloudRedis_UpgradeInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1_CloudRedisClient_UpgradeInstance] +// [END redis_v1_generated_CloudRedis_UpgradeInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/CreateInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/CreateInstance/main.go index 9a44baf8799..8ad244ef3ad 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/CreateInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/CreateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_CreateInstance] +// [START redis_v1beta1_generated_CloudRedis_CreateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_CreateInstance] +// [END redis_v1beta1_generated_CloudRedis_CreateInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/DeleteInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/DeleteInstance/main.go index f484e7d9c4d..7c230c1560d 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/DeleteInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_DeleteInstance] +// [START redis_v1beta1_generated_CloudRedis_DeleteInstance_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_DeleteInstance] +// [END redis_v1beta1_generated_CloudRedis_DeleteInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ExportInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ExportInstance/main.go index 909628a66e6..40f55ef6fc8 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ExportInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ExportInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_ExportInstance] +// [START redis_v1beta1_generated_CloudRedis_ExportInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_ExportInstance] +// [END redis_v1beta1_generated_CloudRedis_ExportInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/FailoverInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/FailoverInstance/main.go index add39c0503a..e43455ce9b2 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/FailoverInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/FailoverInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_FailoverInstance] +// [START redis_v1beta1_generated_CloudRedis_FailoverInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_FailoverInstance] +// [END redis_v1beta1_generated_CloudRedis_FailoverInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/GetInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/GetInstance/main.go index c97de4b569d..72fc95e33ac 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/GetInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_GetInstance] +// [START redis_v1beta1_generated_CloudRedis_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_GetInstance] +// [END redis_v1beta1_generated_CloudRedis_GetInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ImportInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ImportInstance/main.go index 1fb1cbb82e8..e05e433b713 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ImportInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ImportInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_ImportInstance] +// [START redis_v1beta1_generated_CloudRedis_ImportInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_ImportInstance] +// [END redis_v1beta1_generated_CloudRedis_ImportInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ListInstances/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ListInstances/main.go index 3894c3e74bf..fd1ec1bc7ff 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ListInstances/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_ListInstances] +// [START redis_v1beta1_generated_CloudRedis_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_ListInstances] +// [END redis_v1beta1_generated_CloudRedis_ListInstances_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/NewCloudRedisClient/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/NewCloudRedisClient/main.go deleted file mode 100644 index bc93f8a717f..00000000000 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/NewCloudRedisClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START redis_generated_redis_apiv1beta1_NewCloudRedisClient] - -package main - -import ( - "context" - - redis "cloud.google.com/go/redis/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := redis.NewCloudRedisClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END redis_generated_redis_apiv1beta1_NewCloudRedisClient] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpdateInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpdateInstance/main.go index 2c9e7f28169..603d351f1af 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpdateInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpdateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_UpdateInstance] +// [START redis_v1beta1_generated_CloudRedis_UpdateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_UpdateInstance] +// [END redis_v1beta1_generated_CloudRedis_UpdateInstance_sync] diff --git a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpgradeInstance/main.go b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpgradeInstance/main.go index 3d4a5c0dcf8..1f186caf54e 100644 --- a/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpgradeInstance/main.go +++ b/internal/generated/snippets/redis/apiv1beta1/CloudRedisClient/UpgradeInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START redis_generated_redis_apiv1beta1_CloudRedisClient_UpgradeInstance] +// [START redis_v1beta1_generated_CloudRedis_UpgradeInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END redis_generated_redis_apiv1beta1_CloudRedisClient_UpgradeInstance] +// [END redis_v1beta1_generated_CloudRedis_UpgradeInstance_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/CreateFolder/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/CreateFolder/main.go index 0d966b5917c..4be92a8f1fb 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/CreateFolder/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/CreateFolder/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_CreateFolder] +// [START cloudresourcemanager_v2_generated_Folders_CreateFolder_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_CreateFolder] +// [END cloudresourcemanager_v2_generated_Folders_CreateFolder_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/DeleteFolder/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/DeleteFolder/main.go index c13b3e27609..7e16df0feb5 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/DeleteFolder/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/DeleteFolder/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_DeleteFolder] +// [START cloudresourcemanager_v2_generated_Folders_DeleteFolder_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_DeleteFolder] +// [END cloudresourcemanager_v2_generated_Folders_DeleteFolder_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetFolder/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetFolder/main.go index 56b230e886a..62d4a2dae7c 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetFolder/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetFolder/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_GetFolder] +// [START cloudresourcemanager_v2_generated_Folders_GetFolder_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_GetFolder] +// [END cloudresourcemanager_v2_generated_Folders_GetFolder_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetIamPolicy/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetIamPolicy/main.go index 2c1daf7e96b..dc283e8a84c 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_GetIamPolicy] +// [START cloudresourcemanager_v2_generated_Folders_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_GetIamPolicy] +// [END cloudresourcemanager_v2_generated_Folders_GetIamPolicy_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/ListFolders/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/ListFolders/main.go index f3e44c220d1..096d8578e40 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/ListFolders/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/ListFolders/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_ListFolders] +// [START cloudresourcemanager_v2_generated_Folders_ListFolders_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_ListFolders] +// [END cloudresourcemanager_v2_generated_Folders_ListFolders_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/MoveFolder/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/MoveFolder/main.go index bd259c19843..a85613b4a64 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/MoveFolder/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/MoveFolder/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_MoveFolder] +// [START cloudresourcemanager_v2_generated_Folders_MoveFolder_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_MoveFolder] +// [END cloudresourcemanager_v2_generated_Folders_MoveFolder_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/NewFoldersClient/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/NewFoldersClient/main.go deleted file mode 100644 index bb65ac852ca..00000000000 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/NewFoldersClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudresourcemanager_generated_resourcemanager_apiv2_NewFoldersClient] - -package main - -import ( - "context" - - resourcemanager "cloud.google.com/go/resourcemanager/apiv2" -) - -func main() { - ctx := context.Background() - c, err := resourcemanager.NewFoldersClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudresourcemanager_generated_resourcemanager_apiv2_NewFoldersClient] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SearchFolders/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SearchFolders/main.go index 17d4ceac1a9..9bf103d4d4d 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SearchFolders/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SearchFolders/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_SearchFolders] +// [START cloudresourcemanager_v2_generated_Folders_SearchFolders_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_SearchFolders] +// [END cloudresourcemanager_v2_generated_Folders_SearchFolders_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SetIamPolicy/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SetIamPolicy/main.go index 6389090a275..de00cdda0f4 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_SetIamPolicy] +// [START cloudresourcemanager_v2_generated_Folders_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_SetIamPolicy] +// [END cloudresourcemanager_v2_generated_Folders_SetIamPolicy_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/TestIamPermissions/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/TestIamPermissions/main.go index ae36d110b22..4adf0a04f4b 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_TestIamPermissions] +// [START cloudresourcemanager_v2_generated_Folders_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_TestIamPermissions] +// [END cloudresourcemanager_v2_generated_Folders_TestIamPermissions_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UndeleteFolder/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UndeleteFolder/main.go index fd1dab93a27..2ba2a0368c9 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UndeleteFolder/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UndeleteFolder/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_UndeleteFolder] +// [START cloudresourcemanager_v2_generated_Folders_UndeleteFolder_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_UndeleteFolder] +// [END cloudresourcemanager_v2_generated_Folders_UndeleteFolder_sync] diff --git a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UpdateFolder/main.go b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UpdateFolder/main.go index 4e39f6a86a4..b758cb33d06 100644 --- a/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UpdateFolder/main.go +++ b/internal/generated/snippets/resourcemanager/apiv2/FoldersClient/UpdateFolder/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_UpdateFolder] +// [START cloudresourcemanager_v2_generated_Folders_UpdateFolder_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudresourcemanager_generated_resourcemanager_apiv2_FoldersClient_UpdateFolder] +// [END cloudresourcemanager_v2_generated_Folders_UpdateFolder_sync] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/CreateSettingValue/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/CreateSettingValue/main.go deleted file mode 100644 index 8671709413d..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/CreateSettingValue/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_Client_CreateSettingValue] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" - resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" -) - -func main() { - // import resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" - - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &resourcesettingspb.CreateSettingValueRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.CreateSettingValue(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END resourcesettings_generated_resourcesettings_apiv1_Client_CreateSettingValue] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/DeleteSettingValue/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/DeleteSettingValue/main.go deleted file mode 100644 index 60e30a7d666..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/DeleteSettingValue/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_Client_DeleteSettingValue] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" - resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" -) - -func main() { - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &resourcesettingspb.DeleteSettingValueRequest{ - // TODO: Fill request struct fields. - } - err = c.DeleteSettingValue(ctx, req) - if err != nil { - // TODO: Handle error. - } -} - -// [END resourcesettings_generated_resourcesettings_apiv1_Client_DeleteSettingValue] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/GetSettingValue/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/GetSettingValue/main.go deleted file mode 100644 index 73ab6e24d4f..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/GetSettingValue/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_Client_GetSettingValue] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" - resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" -) - -func main() { - // import resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" - - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &resourcesettingspb.GetSettingValueRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.GetSettingValue(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END resourcesettings_generated_resourcesettings_apiv1_Client_GetSettingValue] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/ListSettings/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/ListSettings/main.go index a0646bbd842..a04b2e02533 100644 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/ListSettings/main.go +++ b/internal/generated/snippets/resourcesettings/apiv1/Client/ListSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START resourcesettings_generated_resourcesettings_apiv1_Client_ListSettings] +// [START resourcesettings_v1_generated_ResourceSettingsService_ListSettings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END resourcesettings_generated_resourcesettings_apiv1_Client_ListSettings] +// [END resourcesettings_v1_generated_ResourceSettingsService_ListSettings_sync] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/LookupEffectiveSettingValue/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/LookupEffectiveSettingValue/main.go deleted file mode 100644 index e77f0475444..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/LookupEffectiveSettingValue/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_Client_LookupEffectiveSettingValue] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" - resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" -) - -func main() { - // import resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" - - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &resourcesettingspb.LookupEffectiveSettingValueRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.LookupEffectiveSettingValue(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END resourcesettings_generated_resourcesettings_apiv1_Client_LookupEffectiveSettingValue] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/NewClient/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/NewClient/main.go deleted file mode 100644 index 197ca928948..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_NewClient] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" -) - -func main() { - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END resourcesettings_generated_resourcesettings_apiv1_NewClient] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/SearchSettingValues/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/SearchSettingValues/main.go deleted file mode 100644 index 709ac9a6bc3..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/SearchSettingValues/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_Client_SearchSettingValues] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" - "google.golang.org/api/iterator" - resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" -) - -func main() { - // import resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" - // import "google.golang.org/api/iterator" - - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &resourcesettingspb.SearchSettingValuesRequest{ - // TODO: Fill request struct fields. - } - it := c.SearchSettingValues(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END resourcesettings_generated_resourcesettings_apiv1_Client_SearchSettingValues] diff --git a/internal/generated/snippets/resourcesettings/apiv1/Client/UpdateSettingValue/main.go b/internal/generated/snippets/resourcesettings/apiv1/Client/UpdateSettingValue/main.go deleted file mode 100644 index aedaecc2249..00000000000 --- a/internal/generated/snippets/resourcesettings/apiv1/Client/UpdateSettingValue/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START resourcesettings_generated_resourcesettings_apiv1_Client_UpdateSettingValue] - -package main - -import ( - "context" - - resourcesettings "cloud.google.com/go/resourcesettings/apiv1" - resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" -) - -func main() { - // import resourcesettingspb "google.golang.org/genproto/googleapis/cloud/resourcesettings/v1" - - ctx := context.Background() - c, err := resourcesettings.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - req := &resourcesettingspb.UpdateSettingValueRequest{ - // TODO: Fill request struct fields. - } - resp, err := c.UpdateSettingValue(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END resourcesettings_generated_resourcesettings_apiv1_Client_UpdateSettingValue] diff --git a/internal/generated/snippets/retail/apiv2/CatalogClient/ListCatalogs/main.go b/internal/generated/snippets/retail/apiv2/CatalogClient/ListCatalogs/main.go index 40a6e12d4ac..681fa87d6d8 100644 --- a/internal/generated/snippets/retail/apiv2/CatalogClient/ListCatalogs/main.go +++ b/internal/generated/snippets/retail/apiv2/CatalogClient/ListCatalogs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_CatalogClient_ListCatalogs] +// [START retail_v2_generated_CatalogService_ListCatalogs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END retail_generated_retail_apiv2_CatalogClient_ListCatalogs] +// [END retail_v2_generated_CatalogService_ListCatalogs_sync] diff --git a/internal/generated/snippets/retail/apiv2/CatalogClient/NewCatalogClient/main.go b/internal/generated/snippets/retail/apiv2/CatalogClient/NewCatalogClient/main.go deleted file mode 100644 index 3efbac9607f..00000000000 --- a/internal/generated/snippets/retail/apiv2/CatalogClient/NewCatalogClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START retail_generated_retail_apiv2_NewCatalogClient] - -package main - -import ( - "context" - - retail "cloud.google.com/go/retail/apiv2" -) - -func main() { - ctx := context.Background() - c, err := retail.NewCatalogClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END retail_generated_retail_apiv2_NewCatalogClient] diff --git a/internal/generated/snippets/retail/apiv2/CatalogClient/UpdateCatalog/main.go b/internal/generated/snippets/retail/apiv2/CatalogClient/UpdateCatalog/main.go index 20360c259a6..41647143cf7 100644 --- a/internal/generated/snippets/retail/apiv2/CatalogClient/UpdateCatalog/main.go +++ b/internal/generated/snippets/retail/apiv2/CatalogClient/UpdateCatalog/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_CatalogClient_UpdateCatalog] +// [START retail_v2_generated_CatalogService_UpdateCatalog_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_CatalogClient_UpdateCatalog] +// [END retail_v2_generated_CatalogService_UpdateCatalog_sync] diff --git a/internal/generated/snippets/retail/apiv2/PredictionClient/NewPredictionClient/main.go b/internal/generated/snippets/retail/apiv2/PredictionClient/NewPredictionClient/main.go deleted file mode 100644 index e6e7b27ce0c..00000000000 --- a/internal/generated/snippets/retail/apiv2/PredictionClient/NewPredictionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START retail_generated_retail_apiv2_NewPredictionClient] - -package main - -import ( - "context" - - retail "cloud.google.com/go/retail/apiv2" -) - -func main() { - ctx := context.Background() - c, err := retail.NewPredictionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END retail_generated_retail_apiv2_NewPredictionClient] diff --git a/internal/generated/snippets/retail/apiv2/PredictionClient/Predict/main.go b/internal/generated/snippets/retail/apiv2/PredictionClient/Predict/main.go index 8c5c3bbfd95..6e001673e25 100644 --- a/internal/generated/snippets/retail/apiv2/PredictionClient/Predict/main.go +++ b/internal/generated/snippets/retail/apiv2/PredictionClient/Predict/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_PredictionClient_Predict] +// [START retail_v2_generated_PredictionService_Predict_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_PredictionClient_Predict] +// [END retail_v2_generated_PredictionService_Predict_sync] diff --git a/internal/generated/snippets/retail/apiv2/ProductClient/CreateProduct/main.go b/internal/generated/snippets/retail/apiv2/ProductClient/CreateProduct/main.go index 6186a761087..4fba12dadc8 100644 --- a/internal/generated/snippets/retail/apiv2/ProductClient/CreateProduct/main.go +++ b/internal/generated/snippets/retail/apiv2/ProductClient/CreateProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_ProductClient_CreateProduct] +// [START retail_v2_generated_ProductService_CreateProduct_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_ProductClient_CreateProduct] +// [END retail_v2_generated_ProductService_CreateProduct_sync] diff --git a/internal/generated/snippets/retail/apiv2/ProductClient/DeleteProduct/main.go b/internal/generated/snippets/retail/apiv2/ProductClient/DeleteProduct/main.go index 9f7a8cf5225..7f6d3c0023b 100644 --- a/internal/generated/snippets/retail/apiv2/ProductClient/DeleteProduct/main.go +++ b/internal/generated/snippets/retail/apiv2/ProductClient/DeleteProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_ProductClient_DeleteProduct] +// [START retail_v2_generated_ProductService_DeleteProduct_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END retail_generated_retail_apiv2_ProductClient_DeleteProduct] +// [END retail_v2_generated_ProductService_DeleteProduct_sync] diff --git a/internal/generated/snippets/retail/apiv2/ProductClient/GetProduct/main.go b/internal/generated/snippets/retail/apiv2/ProductClient/GetProduct/main.go index 9b1f7e80feb..d3919550119 100644 --- a/internal/generated/snippets/retail/apiv2/ProductClient/GetProduct/main.go +++ b/internal/generated/snippets/retail/apiv2/ProductClient/GetProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_ProductClient_GetProduct] +// [START retail_v2_generated_ProductService_GetProduct_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_ProductClient_GetProduct] +// [END retail_v2_generated_ProductService_GetProduct_sync] diff --git a/internal/generated/snippets/retail/apiv2/ProductClient/ImportProducts/main.go b/internal/generated/snippets/retail/apiv2/ProductClient/ImportProducts/main.go index bf32a1644e0..a0fc7fa7287 100644 --- a/internal/generated/snippets/retail/apiv2/ProductClient/ImportProducts/main.go +++ b/internal/generated/snippets/retail/apiv2/ProductClient/ImportProducts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_ProductClient_ImportProducts] +// [START retail_v2_generated_ProductService_ImportProducts_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_ProductClient_ImportProducts] +// [END retail_v2_generated_ProductService_ImportProducts_sync] diff --git a/internal/generated/snippets/retail/apiv2/ProductClient/NewProductClient/main.go b/internal/generated/snippets/retail/apiv2/ProductClient/NewProductClient/main.go deleted file mode 100644 index b2566786485..00000000000 --- a/internal/generated/snippets/retail/apiv2/ProductClient/NewProductClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START retail_generated_retail_apiv2_NewProductClient] - -package main - -import ( - "context" - - retail "cloud.google.com/go/retail/apiv2" -) - -func main() { - ctx := context.Background() - c, err := retail.NewProductClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END retail_generated_retail_apiv2_NewProductClient] diff --git a/internal/generated/snippets/retail/apiv2/ProductClient/UpdateProduct/main.go b/internal/generated/snippets/retail/apiv2/ProductClient/UpdateProduct/main.go index 6a91ddf54b9..73c03616f46 100644 --- a/internal/generated/snippets/retail/apiv2/ProductClient/UpdateProduct/main.go +++ b/internal/generated/snippets/retail/apiv2/ProductClient/UpdateProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_ProductClient_UpdateProduct] +// [START retail_v2_generated_ProductService_UpdateProduct_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_ProductClient_UpdateProduct] +// [END retail_v2_generated_ProductService_UpdateProduct_sync] diff --git a/internal/generated/snippets/retail/apiv2/UserEventClient/CollectUserEvent/main.go b/internal/generated/snippets/retail/apiv2/UserEventClient/CollectUserEvent/main.go index 6d4efa13b9d..cf91388312c 100644 --- a/internal/generated/snippets/retail/apiv2/UserEventClient/CollectUserEvent/main.go +++ b/internal/generated/snippets/retail/apiv2/UserEventClient/CollectUserEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_UserEventClient_CollectUserEvent] +// [START retail_v2_generated_UserEventService_CollectUserEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_UserEventClient_CollectUserEvent] +// [END retail_v2_generated_UserEventService_CollectUserEvent_sync] diff --git a/internal/generated/snippets/retail/apiv2/UserEventClient/ImportUserEvents/main.go b/internal/generated/snippets/retail/apiv2/UserEventClient/ImportUserEvents/main.go index 658e6c17d45..44d12c574f4 100644 --- a/internal/generated/snippets/retail/apiv2/UserEventClient/ImportUserEvents/main.go +++ b/internal/generated/snippets/retail/apiv2/UserEventClient/ImportUserEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_UserEventClient_ImportUserEvents] +// [START retail_v2_generated_UserEventService_ImportUserEvents_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_UserEventClient_ImportUserEvents] +// [END retail_v2_generated_UserEventService_ImportUserEvents_sync] diff --git a/internal/generated/snippets/retail/apiv2/UserEventClient/NewUserEventClient/main.go b/internal/generated/snippets/retail/apiv2/UserEventClient/NewUserEventClient/main.go deleted file mode 100644 index bdfa0119ce7..00000000000 --- a/internal/generated/snippets/retail/apiv2/UserEventClient/NewUserEventClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START retail_generated_retail_apiv2_NewUserEventClient] - -package main - -import ( - "context" - - retail "cloud.google.com/go/retail/apiv2" -) - -func main() { - ctx := context.Background() - c, err := retail.NewUserEventClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END retail_generated_retail_apiv2_NewUserEventClient] diff --git a/internal/generated/snippets/retail/apiv2/UserEventClient/PurgeUserEvents/main.go b/internal/generated/snippets/retail/apiv2/UserEventClient/PurgeUserEvents/main.go index 8a8bafdce43..0198513d211 100644 --- a/internal/generated/snippets/retail/apiv2/UserEventClient/PurgeUserEvents/main.go +++ b/internal/generated/snippets/retail/apiv2/UserEventClient/PurgeUserEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_UserEventClient_PurgeUserEvents] +// [START retail_v2_generated_UserEventService_PurgeUserEvents_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_UserEventClient_PurgeUserEvents] +// [END retail_v2_generated_UserEventService_PurgeUserEvents_sync] diff --git a/internal/generated/snippets/retail/apiv2/UserEventClient/RejoinUserEvents/main.go b/internal/generated/snippets/retail/apiv2/UserEventClient/RejoinUserEvents/main.go index 44f385ef882..634bede9230 100644 --- a/internal/generated/snippets/retail/apiv2/UserEventClient/RejoinUserEvents/main.go +++ b/internal/generated/snippets/retail/apiv2/UserEventClient/RejoinUserEvents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_UserEventClient_RejoinUserEvents] +// [START retail_v2_generated_UserEventService_RejoinUserEvents_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_UserEventClient_RejoinUserEvents] +// [END retail_v2_generated_UserEventService_RejoinUserEvents_sync] diff --git a/internal/generated/snippets/retail/apiv2/UserEventClient/WriteUserEvent/main.go b/internal/generated/snippets/retail/apiv2/UserEventClient/WriteUserEvent/main.go index 5b1183cdccf..34c3744e429 100644 --- a/internal/generated/snippets/retail/apiv2/UserEventClient/WriteUserEvent/main.go +++ b/internal/generated/snippets/retail/apiv2/UserEventClient/WriteUserEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START retail_generated_retail_apiv2_UserEventClient_WriteUserEvent] +// [START retail_v2_generated_UserEventService_WriteUserEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END retail_generated_retail_apiv2_UserEventClient_WriteUserEvent] +// [END retail_v2_generated_UserEventService_WriteUserEvent_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/CreateJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/CreateJob/main.go index bb4b7a66e85..20354459491 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/CreateJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/CreateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_CreateJob] +// [START cloudscheduler_v1_generated_CloudScheduler_CreateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_CreateJob] +// [END cloudscheduler_v1_generated_CloudScheduler_CreateJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/DeleteJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/DeleteJob/main.go index 057e38c8c8d..74c88200d10 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/DeleteJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_DeleteJob] +// [START cloudscheduler_v1_generated_CloudScheduler_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_DeleteJob] +// [END cloudscheduler_v1_generated_CloudScheduler_DeleteJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/GetJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/GetJob/main.go index f5ecd7dedc3..ce28400f7e3 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/GetJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_GetJob] +// [START cloudscheduler_v1_generated_CloudScheduler_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_GetJob] +// [END cloudscheduler_v1_generated_CloudScheduler_GetJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ListJobs/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ListJobs/main.go index f748847d6de..d66d7576c41 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ListJobs/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_ListJobs] +// [START cloudscheduler_v1_generated_CloudScheduler_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_ListJobs] +// [END cloudscheduler_v1_generated_CloudScheduler_ListJobs_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/NewCloudSchedulerClient/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/NewCloudSchedulerClient/main.go deleted file mode 100644 index c933443cbd4..00000000000 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/NewCloudSchedulerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudscheduler_generated_scheduler_apiv1_NewCloudSchedulerClient] - -package main - -import ( - "context" - - scheduler "cloud.google.com/go/scheduler/apiv1" -) - -func main() { - ctx := context.Background() - c, err := scheduler.NewCloudSchedulerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudscheduler_generated_scheduler_apiv1_NewCloudSchedulerClient] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/PauseJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/PauseJob/main.go index e16c6032d1a..448a3c42b2d 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/PauseJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/PauseJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_PauseJob] +// [START cloudscheduler_v1_generated_CloudScheduler_PauseJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_PauseJob] +// [END cloudscheduler_v1_generated_CloudScheduler_PauseJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ResumeJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ResumeJob/main.go index 4c6fbfaf72b..e6e8888ef19 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ResumeJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/ResumeJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_ResumeJob] +// [START cloudscheduler_v1_generated_CloudScheduler_ResumeJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_ResumeJob] +// [END cloudscheduler_v1_generated_CloudScheduler_ResumeJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/RunJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/RunJob/main.go index a838383a11b..216d8b32ef0 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/RunJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/RunJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_RunJob] +// [START cloudscheduler_v1_generated_CloudScheduler_RunJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_RunJob] +// [END cloudscheduler_v1_generated_CloudScheduler_RunJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/UpdateJob/main.go b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/UpdateJob/main.go index 6e5eafe813f..b745a0b4ae8 100644 --- a/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/UpdateJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1/CloudSchedulerClient/UpdateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_UpdateJob] +// [START cloudscheduler_v1_generated_CloudScheduler_UpdateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1_CloudSchedulerClient_UpdateJob] +// [END cloudscheduler_v1_generated_CloudScheduler_UpdateJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/CreateJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/CreateJob/main.go index 8c548536a94..b7eb5a50224 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/CreateJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/CreateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_CreateJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_CreateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_CreateJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_CreateJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/DeleteJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/DeleteJob/main.go index 56f3c0968e0..7838477169c 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/DeleteJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_DeleteJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_DeleteJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_DeleteJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/GetJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/GetJob/main.go index 5ac4aa09c71..f875ad976de 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/GetJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_GetJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_GetJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_GetJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ListJobs/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ListJobs/main.go index fafcaee2e29..b846661efb0 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ListJobs/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_ListJobs] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_ListJobs] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_ListJobs_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/NewCloudSchedulerClient/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/NewCloudSchedulerClient/main.go deleted file mode 100644 index c13984400d9..00000000000 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/NewCloudSchedulerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudscheduler_generated_scheduler_apiv1beta1_NewCloudSchedulerClient] - -package main - -import ( - "context" - - scheduler "cloud.google.com/go/scheduler/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := scheduler.NewCloudSchedulerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudscheduler_generated_scheduler_apiv1beta1_NewCloudSchedulerClient] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/PauseJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/PauseJob/main.go index 90095a9755a..e561d78065d 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/PauseJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/PauseJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_PauseJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_PauseJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_PauseJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_PauseJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ResumeJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ResumeJob/main.go index df1c03662ac..79f450f5cf4 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ResumeJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/ResumeJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_ResumeJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_ResumeJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_ResumeJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_ResumeJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/RunJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/RunJob/main.go index b6040942e8a..01ce0623755 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/RunJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/RunJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_RunJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_RunJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_RunJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_RunJob_sync] diff --git a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/UpdateJob/main.go b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/UpdateJob/main.go index 4b2f6cce65d..5d34e186b07 100644 --- a/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/UpdateJob/main.go +++ b/internal/generated/snippets/scheduler/apiv1beta1/CloudSchedulerClient/UpdateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_UpdateJob] +// [START cloudscheduler_v1beta1_generated_CloudScheduler_UpdateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudscheduler_generated_scheduler_apiv1beta1_CloudSchedulerClient_UpdateJob] +// [END cloudscheduler_v1beta1_generated_CloudScheduler_UpdateJob_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/AccessSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/AccessSecretVersion/main.go index f50a479e471..54034a92f47 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/AccessSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/AccessSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_AccessSecretVersion] +// [START secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_AccessSecretVersion] +// [END secretmanager_v1_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/AddSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/AddSecretVersion/main.go index acc823c99ef..fc4663a7dfa 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/AddSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/AddSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_AddSecretVersion] +// [START secretmanager_v1_generated_SecretManagerService_AddSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_AddSecretVersion] +// [END secretmanager_v1_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/CreateSecret/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/CreateSecret/main.go index fa4dbbb5d7b..8524ca551b7 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/CreateSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/CreateSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_CreateSecret] +// [START secretmanager_v1_generated_SecretManagerService_CreateSecret_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_CreateSecret] +// [END secretmanager_v1_generated_SecretManagerService_CreateSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/DeleteSecret/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/DeleteSecret/main.go index ba5ebba34fb..b775054f186 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/DeleteSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/DeleteSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_DeleteSecret] +// [START secretmanager_v1_generated_SecretManagerService_DeleteSecret_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END secretmanager_generated_secretmanager_apiv1_Client_DeleteSecret] +// [END secretmanager_v1_generated_SecretManagerService_DeleteSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/DestroySecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/DestroySecretVersion/main.go index c0083e1ace8..4dc95bc612e 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/DestroySecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/DestroySecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_DestroySecretVersion] +// [START secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_DestroySecretVersion] +// [END secretmanager_v1_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/DisableSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/DisableSecretVersion/main.go index 9b3ff6d1ebd..c4308ffe205 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/DisableSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/DisableSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_DisableSecretVersion] +// [START secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_DisableSecretVersion] +// [END secretmanager_v1_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/EnableSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/EnableSecretVersion/main.go index ed1a75e71eb..29cb3fd8391 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/EnableSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/EnableSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_EnableSecretVersion] +// [START secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_EnableSecretVersion] +// [END secretmanager_v1_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/GetIamPolicy/main.go index 12ec4488c49..d65ef605ced 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_GetIamPolicy] +// [START secretmanager_v1_generated_SecretManagerService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_GetIamPolicy] +// [END secretmanager_v1_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/GetSecret/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/GetSecret/main.go index d79ce55f051..a6b5d024d0f 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/GetSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/GetSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_GetSecret] +// [START secretmanager_v1_generated_SecretManagerService_GetSecret_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_GetSecret] +// [END secretmanager_v1_generated_SecretManagerService_GetSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/GetSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/GetSecretVersion/main.go index 56e7a8adca9..8961a67986f 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/GetSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/GetSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_GetSecretVersion] +// [START secretmanager_v1_generated_SecretManagerService_GetSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_GetSecretVersion] +// [END secretmanager_v1_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/IAM/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/IAM/main.go deleted file mode 100644 index 35287a4f607..00000000000 --- a/internal/generated/snippets/secretmanager/apiv1/Client/IAM/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START secretmanager_generated_secretmanager_apiv1_Client_IAM] - -package main - -import ( - "context" - - secretmanager "cloud.google.com/go/secretmanager/apiv1" -) - -func main() { - ctx := context.Background() - c, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - // TODO: fill in secret resource path - secret := "projects/[PROJECT_ID]/secrets/[SECRET]" - handle := c.IAM(secret) - - policy, err := handle.Policy(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use policy. - _ = policy -} - -// [END secretmanager_generated_secretmanager_apiv1_Client_IAM] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/ListSecretVersions/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/ListSecretVersions/main.go index 1c4b5a11ace..10dd589cce7 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/ListSecretVersions/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/ListSecretVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_ListSecretVersions] +// [START secretmanager_v1_generated_SecretManagerService_ListSecretVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END secretmanager_generated_secretmanager_apiv1_Client_ListSecretVersions] +// [END secretmanager_v1_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/ListSecrets/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/ListSecrets/main.go index dc72dfc2959..a079dd58af1 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/ListSecrets/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/ListSecrets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_ListSecrets] +// [START secretmanager_v1_generated_SecretManagerService_ListSecrets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END secretmanager_generated_secretmanager_apiv1_Client_ListSecrets] +// [END secretmanager_v1_generated_SecretManagerService_ListSecrets_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/NewClient/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/NewClient/main.go deleted file mode 100644 index 913057d9fcc..00000000000 --- a/internal/generated/snippets/secretmanager/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START secretmanager_generated_secretmanager_apiv1_NewClient] - -package main - -import ( - "context" - - secretmanager "cloud.google.com/go/secretmanager/apiv1" -) - -func main() { - ctx := context.Background() - c, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END secretmanager_generated_secretmanager_apiv1_NewClient] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/SetIamPolicy/main.go index 314c4a985b5..ebcc22912a0 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_SetIamPolicy] +// [START secretmanager_v1_generated_SecretManagerService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_SetIamPolicy] +// [END secretmanager_v1_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/TestIamPermissions/main.go index 099e0882162..a8491ad5dfb 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_TestIamPermissions] +// [START secretmanager_v1_generated_SecretManagerService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_TestIamPermissions] +// [END secretmanager_v1_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1/Client/UpdateSecret/main.go b/internal/generated/snippets/secretmanager/apiv1/Client/UpdateSecret/main.go index e0c1cd644aa..79b27967494 100644 --- a/internal/generated/snippets/secretmanager/apiv1/Client/UpdateSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1/Client/UpdateSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1_Client_UpdateSecret] +// [START secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1_Client_UpdateSecret] +// [END secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/AccessSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/AccessSecretVersion/main.go index dc6bd08f26a..e7be66f319e 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/AccessSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/AccessSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_AccessSecretVersion] +// [START secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_AccessSecretVersion] +// [END secretmanager_v1beta1_generated_SecretManagerService_AccessSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/AddSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/AddSecretVersion/main.go index 64ad940e436..7a9e8fe0e46 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/AddSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/AddSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_AddSecretVersion] +// [START secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_AddSecretVersion] +// [END secretmanager_v1beta1_generated_SecretManagerService_AddSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/CreateSecret/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/CreateSecret/main.go index f297e8c5b92..fa4549e5a97 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/CreateSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/CreateSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_CreateSecret] +// [START secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_CreateSecret] +// [END secretmanager_v1beta1_generated_SecretManagerService_CreateSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/DeleteSecret/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/DeleteSecret/main.go index 1aa13dc3625..56a42cda3d9 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/DeleteSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/DeleteSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_DeleteSecret] +// [START secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_DeleteSecret] +// [END secretmanager_v1beta1_generated_SecretManagerService_DeleteSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/DestroySecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/DestroySecretVersion/main.go index 37336e53c73..3f3f5dd1929 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/DestroySecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/DestroySecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_DestroySecretVersion] +// [START secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_DestroySecretVersion] +// [END secretmanager_v1beta1_generated_SecretManagerService_DestroySecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/DisableSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/DisableSecretVersion/main.go index 064747163e4..006c351b760 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/DisableSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/DisableSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_DisableSecretVersion] +// [START secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_DisableSecretVersion] +// [END secretmanager_v1beta1_generated_SecretManagerService_DisableSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/EnableSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/EnableSecretVersion/main.go index 4da6c0ae1b0..f2234852125 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/EnableSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/EnableSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_EnableSecretVersion] +// [START secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_EnableSecretVersion] +// [END secretmanager_v1beta1_generated_SecretManagerService_EnableSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetIamPolicy/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetIamPolicy/main.go index 5df1ea85680..2426ce50411 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_GetIamPolicy] +// [START secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_GetIamPolicy] +// [END secretmanager_v1beta1_generated_SecretManagerService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecret/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecret/main.go index 4f56127a49c..905c045e09f 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_GetSecret] +// [START secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_GetSecret] +// [END secretmanager_v1beta1_generated_SecretManagerService_GetSecret_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecretVersion/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecretVersion/main.go index 885eea9cb03..244c088a638 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecretVersion/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/GetSecretVersion/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_GetSecretVersion] +// [START secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_GetSecretVersion] +// [END secretmanager_v1beta1_generated_SecretManagerService_GetSecretVersion_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/IAM/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/IAM/main.go deleted file mode 100644 index 2966b3b5b99..00000000000 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/IAM/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_IAM] - -package main - -import ( - "context" - - secretmanager "cloud.google.com/go/secretmanager/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - - // TODO: fill in secret resource path - secret := "projects/[PROJECT_ID]/secrets/[SECRET]" - handle := c.IAM(secret) - - policy, err := handle.Policy(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use policy. - _ = policy -} - -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_IAM] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecretVersions/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecretVersions/main.go index d40d8c75a1e..198cbe131b9 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecretVersions/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecretVersions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_ListSecretVersions] +// [START secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_ListSecretVersions] +// [END secretmanager_v1beta1_generated_SecretManagerService_ListSecretVersions_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecrets/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecrets/main.go index 89d73bbee20..d230550fa39 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecrets/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/ListSecrets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_ListSecrets] +// [START secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_ListSecrets] +// [END secretmanager_v1beta1_generated_SecretManagerService_ListSecrets_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 99059dbe4d0..00000000000 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START secretmanager_generated_secretmanager_apiv1beta1_NewClient] - -package main - -import ( - "context" - - secretmanager "cloud.google.com/go/secretmanager/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := secretmanager.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END secretmanager_generated_secretmanager_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/SetIamPolicy/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/SetIamPolicy/main.go index 773fd9cb99b..d25e626d52e 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_SetIamPolicy] +// [START secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_SetIamPolicy] +// [END secretmanager_v1beta1_generated_SecretManagerService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/TestIamPermissions/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/TestIamPermissions/main.go index d89e0584c62..66e101322bf 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_TestIamPermissions] +// [START secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_TestIamPermissions] +// [END secretmanager_v1beta1_generated_SecretManagerService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/secretmanager/apiv1beta1/Client/UpdateSecret/main.go b/internal/generated/snippets/secretmanager/apiv1beta1/Client/UpdateSecret/main.go index 73f5a825087..07d367f48d3 100644 --- a/internal/generated/snippets/secretmanager/apiv1beta1/Client/UpdateSecret/main.go +++ b/internal/generated/snippets/secretmanager/apiv1beta1/Client/UpdateSecret/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START secretmanager_generated_secretmanager_apiv1beta1_Client_UpdateSecret] +// [START secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END secretmanager_generated_secretmanager_apiv1beta1_Client_UpdateSecret] +// [END secretmanager_v1beta1_generated_SecretManagerService_UpdateSecret_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ActivateCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ActivateCertificateAuthority/main.go index 62ce187dd57..e69ca3fb994 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ActivateCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ActivateCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ActivateCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ActivateCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificate/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificate/main.go index a71d68ff3ef..0d6d4486e95 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificate/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_CreateCertificate] +// [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_CreateCertificate] +// [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificateAuthority/main.go index b792e1503bc..ab5af6c755f 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/CreateCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_CreateCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_CreateCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/DisableCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/DisableCertificateAuthority/main.go index af7ea6ceb56..b243384345d 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/DisableCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/DisableCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_DisableCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_DisableCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/EnableCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/EnableCertificateAuthority/main.go index c4b6bd5c61a..03b18c31b64 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/EnableCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/EnableCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_EnableCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_EnableCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/FetchCertificateAuthorityCsr/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/FetchCertificateAuthorityCsr/main.go index a6c82193525..d80dffbc057 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/FetchCertificateAuthorityCsr/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/FetchCertificateAuthorityCsr/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_FetchCertificateAuthorityCsr] +// [START privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_FetchCertificateAuthorityCsr] +// [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificate/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificate/main.go index 4bb530b75ec..334fc041588 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificate/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetCertificate] +// [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetCertificate] +// [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateAuthority/main.go index ece19cfc215..c9f65e5029f 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateRevocationList/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateRevocationList/main.go index d0e6fc1bc86..98646239b05 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateRevocationList/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetCertificateRevocationList/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetCertificateRevocationList] +// [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetCertificateRevocationList] +// [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetReusableConfig/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetReusableConfig/main.go index 8f2d1fde33f..fdad71bcf2a 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetReusableConfig/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/GetReusableConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetReusableConfig] +// [START privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_GetReusableConfig] +// [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateAuthorities/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateAuthorities/main.go index 6a839400d41..25d5a4458fa 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateAuthorities/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateAuthorities/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListCertificateAuthorities] +// [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListCertificateAuthorities] +// [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateRevocationLists/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateRevocationLists/main.go index fe2aeb3a567..f2009856860 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateRevocationLists/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificateRevocationLists/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListCertificateRevocationLists] +// [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListCertificateRevocationLists] +// [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificates/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificates/main.go index adfb007438e..62237e1a2da 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificates/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListCertificates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListCertificates] +// [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListCertificates] +// [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListReusableConfigs/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListReusableConfigs/main.go index 17961498533..1c86fb17993 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListReusableConfigs/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ListReusableConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListReusableConfigs] +// [START privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ListReusableConfigs] +// [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/NewCertificateAuthorityClient/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/NewCertificateAuthorityClient/main.go deleted file mode 100644 index 7c5102b936b..00000000000 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/NewCertificateAuthorityClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START privateca_generated_security_privateca_apiv1beta1_NewCertificateAuthorityClient] - -package main - -import ( - "context" - - privateca "cloud.google.com/go/security/privateca/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := privateca.NewCertificateAuthorityClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END privateca_generated_security_privateca_apiv1beta1_NewCertificateAuthorityClient] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RestoreCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RestoreCertificateAuthority/main.go index a45b61593f9..58f5ac655f7 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RestoreCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RestoreCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_RestoreCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_RestoreCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RevokeCertificate/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RevokeCertificate/main.go index d1fb71bdeed..cf150c54864 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RevokeCertificate/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/RevokeCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_RevokeCertificate] +// [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_RevokeCertificate] +// [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ScheduleDeleteCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ScheduleDeleteCertificateAuthority/main.go index 707c94e292f..65a18601669 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ScheduleDeleteCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/ScheduleDeleteCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ScheduleDeleteCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_ScheduleDeleteCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificate/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificate/main.go index a4a27a81126..0735d63039e 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificate/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_UpdateCertificate] +// [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_UpdateCertificate] +// [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateAuthority/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateAuthority/main.go index 73835c39796..dafe825ffbc 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateAuthority/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateAuthority/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_UpdateCertificateAuthority] +// [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_UpdateCertificateAuthority] +// [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_sync] diff --git a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateRevocationList/main.go b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateRevocationList/main.go index b81f1131f48..529b5c89267 100644 --- a/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateRevocationList/main.go +++ b/internal/generated/snippets/security/privateca/apiv1beta1/CertificateAuthorityClient/UpdateCertificateRevocationList/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_UpdateCertificateRevocationList] +// [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END privateca_generated_security_privateca_apiv1beta1_CertificateAuthorityClient_UpdateCertificateRevocationList] +// [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/CreateFinding/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/CreateFinding/main.go index 4c350672d21..edbdd5ab6cb 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/CreateFinding/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/CreateFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_CreateFinding] +// [START securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_CreateFinding] +// [END securitycenter_v1_generated_SecurityCenter_CreateFinding_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/CreateNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/CreateNotificationConfig/main.go index 15fe79ceb77..2a7e6e7edfa 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/CreateNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/CreateNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_CreateNotificationConfig] +// [START securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_CreateNotificationConfig] +// [END securitycenter_v1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/CreateSource/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/CreateSource/main.go index c5596169a37..77f45afe4b0 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/CreateSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/CreateSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_CreateSource] +// [START securitycenter_v1_generated_SecurityCenter_CreateSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_CreateSource] +// [END securitycenter_v1_generated_SecurityCenter_CreateSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/DeleteNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/DeleteNotificationConfig/main.go index 1be76a704c3..43db64059d8 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/DeleteNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/DeleteNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_DeleteNotificationConfig] +// [START securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_DeleteNotificationConfig] +// [END securitycenter_v1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/GetIamPolicy/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/GetIamPolicy/main.go index 0fcd32df1be..4dc75a29f90 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_GetIamPolicy] +// [START securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_GetIamPolicy] +// [END securitycenter_v1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/GetNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/GetNotificationConfig/main.go index 569d5e1a6fa..8636f5d1698 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/GetNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/GetNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_GetNotificationConfig] +// [START securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_GetNotificationConfig] +// [END securitycenter_v1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/GetOrganizationSettings/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/GetOrganizationSettings/main.go index b23ea4ce1c8..a133e67005c 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/GetOrganizationSettings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/GetOrganizationSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_GetOrganizationSettings] +// [START securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_GetOrganizationSettings] +// [END securitycenter_v1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/GetSource/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/GetSource/main.go index 831b3eb7481..b6b31a6e027 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/GetSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/GetSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_GetSource] +// [START securitycenter_v1_generated_SecurityCenter_GetSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_GetSource] +// [END securitycenter_v1_generated_SecurityCenter_GetSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/GroupAssets/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/GroupAssets/main.go index 736afd94969..50e63faaf05 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/GroupAssets/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/GroupAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_GroupAssets] +// [START securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_GroupAssets] +// [END securitycenter_v1_generated_SecurityCenter_GroupAssets_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/GroupFindings/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/GroupFindings/main.go index 8a1c042f78e..8842943c6fd 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/GroupFindings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/GroupFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_GroupFindings] +// [START securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_GroupFindings] +// [END securitycenter_v1_generated_SecurityCenter_GroupFindings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/ListAssets/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/ListAssets/main.go index ac9bd6b2142..14a226dc905 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/ListAssets/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/ListAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_ListAssets] +// [START securitycenter_v1_generated_SecurityCenter_ListAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_ListAssets] +// [END securitycenter_v1_generated_SecurityCenter_ListAssets_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/ListFindings/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/ListFindings/main.go index d3333989d5d..21e0b5c13af 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/ListFindings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/ListFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_ListFindings] +// [START securitycenter_v1_generated_SecurityCenter_ListFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_ListFindings] +// [END securitycenter_v1_generated_SecurityCenter_ListFindings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/ListNotificationConfigs/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/ListNotificationConfigs/main.go index 168d547d726..e3b5924ac8c 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/ListNotificationConfigs/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/ListNotificationConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_ListNotificationConfigs] +// [START securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_ListNotificationConfigs] +// [END securitycenter_v1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/ListSources/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/ListSources/main.go index 52612a58af0..7bb785123b6 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/ListSources/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/ListSources/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_ListSources] +// [START securitycenter_v1_generated_SecurityCenter_ListSources_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1_Client_ListSources] +// [END securitycenter_v1_generated_SecurityCenter_ListSources_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/NewClient/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/NewClient/main.go deleted file mode 100644 index f31e56a7a40..00000000000 --- a/internal/generated/snippets/securitycenter/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START securitycenter_generated_securitycenter_apiv1_NewClient] - -package main - -import ( - "context" - - securitycenter "cloud.google.com/go/securitycenter/apiv1" -) - -func main() { - ctx := context.Background() - c, err := securitycenter.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END securitycenter_generated_securitycenter_apiv1_NewClient] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/RunAssetDiscovery/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/RunAssetDiscovery/main.go index 624d9af2332..5e0cb405008 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/RunAssetDiscovery/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/RunAssetDiscovery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_RunAssetDiscovery] +// [START securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_RunAssetDiscovery] +// [END securitycenter_v1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/SetFindingState/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/SetFindingState/main.go index fbe6f918554..9f2e2d2425b 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/SetFindingState/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/SetFindingState/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_SetFindingState] +// [START securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_SetFindingState] +// [END securitycenter_v1_generated_SecurityCenter_SetFindingState_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/SetIamPolicy/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/SetIamPolicy/main.go index fda60d0a63b..c4008b1833d 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_SetIamPolicy] +// [START securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_SetIamPolicy] +// [END securitycenter_v1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/TestIamPermissions/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/TestIamPermissions/main.go index c5390ef44d2..8baf71d4374 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_TestIamPermissions] +// [START securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_TestIamPermissions] +// [END securitycenter_v1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateFinding/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateFinding/main.go index 8c740259578..c9b45e8caf6 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateFinding/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_UpdateFinding] +// [START securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_UpdateFinding] +// [END securitycenter_v1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateNotificationConfig/main.go index 6c180b604c8..4e6dbffac49 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_UpdateNotificationConfig] +// [START securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_UpdateNotificationConfig] +// [END securitycenter_v1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateOrganizationSettings/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateOrganizationSettings/main.go index 042c129cf28..db855aea75a 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateOrganizationSettings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateOrganizationSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_UpdateOrganizationSettings] +// [START securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_UpdateOrganizationSettings] +// [END securitycenter_v1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSecurityMarks/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSecurityMarks/main.go index 167356f0a6a..b5c5e685141 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSecurityMarks/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSecurityMarks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_UpdateSecurityMarks] +// [START securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_UpdateSecurityMarks] +// [END securitycenter_v1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSource/main.go b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSource/main.go index f3c8daaf279..3efc3223e88 100644 --- a/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1/Client/UpdateSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1_Client_UpdateSource] +// [START securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1_Client_UpdateSource] +// [END securitycenter_v1_generated_SecurityCenter_UpdateSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateFinding/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateFinding/main.go index cc80b4dc713..2d0e2bb400c 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateFinding/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_CreateFinding] +// [START securitycenter_v1beta1_generated_SecurityCenter_CreateFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_CreateFinding] +// [END securitycenter_v1beta1_generated_SecurityCenter_CreateFinding_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateSource/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateSource/main.go index c6b0d1927cc..c2738b40214 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/CreateSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_CreateSource] +// [START securitycenter_v1beta1_generated_SecurityCenter_CreateSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_CreateSource] +// [END securitycenter_v1beta1_generated_SecurityCenter_CreateSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetIamPolicy/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetIamPolicy/main.go index 56e1eba91e6..760fba21ce3 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_GetIamPolicy] +// [START securitycenter_v1beta1_generated_SecurityCenter_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_GetIamPolicy] +// [END securitycenter_v1beta1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetOrganizationSettings/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetOrganizationSettings/main.go index 582ddbaadab..430ae4b323c 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetOrganizationSettings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetOrganizationSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_GetOrganizationSettings] +// [START securitycenter_v1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_GetOrganizationSettings] +// [END securitycenter_v1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetSource/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetSource/main.go index 1e81684da6d..bd73eec7066 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GetSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_GetSource] +// [START securitycenter_v1beta1_generated_SecurityCenter_GetSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_GetSource] +// [END securitycenter_v1beta1_generated_SecurityCenter_GetSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupAssets/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupAssets/main.go index 0c518059cdc..76ef441cac0 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupAssets/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_GroupAssets] +// [START securitycenter_v1beta1_generated_SecurityCenter_GroupAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_GroupAssets] +// [END securitycenter_v1beta1_generated_SecurityCenter_GroupAssets_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupFindings/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupFindings/main.go index 24eb34ef5dc..01cab2b216a 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupFindings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/GroupFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_GroupFindings] +// [START securitycenter_v1beta1_generated_SecurityCenter_GroupFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_GroupFindings] +// [END securitycenter_v1beta1_generated_SecurityCenter_GroupFindings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListAssets/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListAssets/main.go index 6ae94fe9799..0d3aac1884e 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListAssets/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_ListAssets] +// [START securitycenter_v1beta1_generated_SecurityCenter_ListAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_ListAssets] +// [END securitycenter_v1beta1_generated_SecurityCenter_ListAssets_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListFindings/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListFindings/main.go index 1f0ccdb21c4..cd09aef3373 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListFindings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_ListFindings] +// [START securitycenter_v1beta1_generated_SecurityCenter_ListFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_ListFindings] +// [END securitycenter_v1beta1_generated_SecurityCenter_ListFindings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListSources/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListSources/main.go index 2b1d298d3bc..52b42eb22f3 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListSources/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/ListSources/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_ListSources] +// [START securitycenter_v1beta1_generated_SecurityCenter_ListSources_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_ListSources] +// [END securitycenter_v1beta1_generated_SecurityCenter_ListSources_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 98a1fb93ec7..00000000000 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START securitycenter_generated_securitycenter_apiv1beta1_NewClient] - -package main - -import ( - "context" - - securitycenter "cloud.google.com/go/securitycenter/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := securitycenter.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END securitycenter_generated_securitycenter_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/RunAssetDiscovery/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/RunAssetDiscovery/main.go index 70851cfbfd1..2fe80f8d4c5 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/RunAssetDiscovery/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/RunAssetDiscovery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_RunAssetDiscovery] +// [START securitycenter_v1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_RunAssetDiscovery] +// [END securitycenter_v1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetFindingState/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetFindingState/main.go index 78380a74023..6e53d201048 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetFindingState/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetFindingState/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_SetFindingState] +// [START securitycenter_v1beta1_generated_SecurityCenter_SetFindingState_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_SetFindingState] +// [END securitycenter_v1beta1_generated_SecurityCenter_SetFindingState_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetIamPolicy/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetIamPolicy/main.go index 88ce4168568..2b9c2e163ac 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_SetIamPolicy] +// [START securitycenter_v1beta1_generated_SecurityCenter_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_SetIamPolicy] +// [END securitycenter_v1beta1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/TestIamPermissions/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/TestIamPermissions/main.go index ae353b5c703..e1daebfddfd 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_TestIamPermissions] +// [START securitycenter_v1beta1_generated_SecurityCenter_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_TestIamPermissions] +// [END securitycenter_v1beta1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateFinding/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateFinding/main.go index 4f4f6e80543..2ad5505c6d9 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateFinding/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateFinding] +// [START securitycenter_v1beta1_generated_SecurityCenter_UpdateFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateFinding] +// [END securitycenter_v1beta1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateOrganizationSettings/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateOrganizationSettings/main.go index 526a7c367c4..52212e95a6e 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateOrganizationSettings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateOrganizationSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateOrganizationSettings] +// [START securitycenter_v1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateOrganizationSettings] +// [END securitycenter_v1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSecurityMarks/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSecurityMarks/main.go index ca6e279087c..d2726fa7abd 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSecurityMarks/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSecurityMarks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateSecurityMarks] +// [START securitycenter_v1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateSecurityMarks] +// [END securitycenter_v1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSource/main.go b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSource/main.go index 0cb56e0f84f..1ca7eea50b7 100644 --- a/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1beta1/Client/UpdateSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateSource] +// [START securitycenter_v1beta1_generated_SecurityCenter_UpdateSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1beta1_Client_UpdateSource] +// [END securitycenter_v1beta1_generated_SecurityCenter_UpdateSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateFinding/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateFinding/main.go index 783fc5e8cf1..bca4a3b89c3 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateFinding/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_CreateFinding] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_CreateFinding] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateFinding_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateNotificationConfig/main.go index 51218a7a88f..bd5708ef37f 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_CreateNotificationConfig] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_CreateNotificationConfig] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateSource/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateSource/main.go index ba695c14dee..4d2f578172a 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/CreateSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_CreateSource] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_CreateSource] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_CreateSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/DeleteNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/DeleteNotificationConfig/main.go index 3d915731888..f9c35ace0b8 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/DeleteNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/DeleteNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_DeleteNotificationConfig] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_DeleteNotificationConfig] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_DeleteNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetIamPolicy/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetIamPolicy/main.go index f4dc6174888..80e7c421d96 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetIamPolicy/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetIamPolicy] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetIamPolicy] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetIamPolicy_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetNotificationConfig/main.go index 1167a851ae9..6ad369fa6e2 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetNotificationConfig] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetNotificationConfig] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetOrganizationSettings/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetOrganizationSettings/main.go index 9b34178f7bd..aad6a4f36ce 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetOrganizationSettings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetOrganizationSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetOrganizationSettings] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetOrganizationSettings] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetOrganizationSettings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetSource/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetSource/main.go index 48cb8712b9f..5fdad56ce15 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GetSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetSource] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_GetSource] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GetSource_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupAssets/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupAssets/main.go index 107442aae98..0d6230f7464 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupAssets/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_GroupAssets] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_GroupAssets] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupAssets_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupFindings/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupFindings/main.go index 1ea7ce2bd16..a731ff40d87 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupFindings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/GroupFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_GroupFindings] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_GroupFindings] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_GroupFindings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListAssets/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListAssets/main.go index 4f495957a1c..a3d41a70a79 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListAssets/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListAssets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListAssets] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListAssets] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListAssets_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListFindings/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListFindings/main.go index 7bed1442e2a..2365fdeca33 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListFindings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListFindings] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListFindings] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListFindings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListNotificationConfigs/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListNotificationConfigs/main.go index e9e7a5bd4ad..f84d97c1b99 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListNotificationConfigs/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListNotificationConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListNotificationConfigs] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListNotificationConfigs] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListNotificationConfigs_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListSources/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListSources/main.go index ef074ad7095..dc35afb5802 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListSources/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/ListSources/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListSources] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_ListSources] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_ListSources_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/NewClient/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/NewClient/main.go deleted file mode 100644 index db7c747c9e6..00000000000 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START securitycenter_generated_securitycenter_apiv1p1beta1_NewClient] - -package main - -import ( - "context" - - securitycenter "cloud.google.com/go/securitycenter/apiv1p1beta1" -) - -func main() { - ctx := context.Background() - c, err := securitycenter.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END securitycenter_generated_securitycenter_apiv1p1beta1_NewClient] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/RunAssetDiscovery/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/RunAssetDiscovery/main.go index b9586a8241b..1748b891454 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/RunAssetDiscovery/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/RunAssetDiscovery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_RunAssetDiscovery] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_RunAssetDiscovery] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_RunAssetDiscovery_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetFindingState/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetFindingState/main.go index 7dd4fb070bc..9801275e9e1 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetFindingState/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetFindingState/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_SetFindingState] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_SetFindingState] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_SetFindingState_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetIamPolicy/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetIamPolicy/main.go index a62b2bb3958..b4212e42e0b 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetIamPolicy/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_SetIamPolicy] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_SetIamPolicy] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_SetIamPolicy_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/TestIamPermissions/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/TestIamPermissions/main.go index b5e279b10db..5b65639ee62 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/TestIamPermissions/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_TestIamPermissions] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_TestIamPermissions] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_TestIamPermissions_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateFinding/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateFinding/main.go index 7b1f52e994e..ec8b71f820f 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateFinding/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateFinding] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateFinding] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateFinding_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateNotificationConfig/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateNotificationConfig/main.go index bb45d0d18ca..14f5b6c6d57 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateNotificationConfig/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateNotificationConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateNotificationConfig] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateNotificationConfig] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateNotificationConfig_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateOrganizationSettings/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateOrganizationSettings/main.go index 37f97dd9796..f52c18afec2 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateOrganizationSettings/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateOrganizationSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateOrganizationSettings] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateOrganizationSettings] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateOrganizationSettings_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSecurityMarks/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSecurityMarks/main.go index 50796b596c5..491d4a8e11b 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSecurityMarks/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSecurityMarks/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateSecurityMarks] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateSecurityMarks] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSecurityMarks_sync] diff --git a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSource/main.go b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSource/main.go index 3cd229b76d7..75822993126 100644 --- a/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSource/main.go +++ b/internal/generated/snippets/securitycenter/apiv1p1beta1/Client/UpdateSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateSource] +// [START securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_apiv1p1beta1_Client_UpdateSource] +// [END securitycenter_v1p1beta1_generated_SecurityCenter_UpdateSource_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchCalculateEffectiveSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchCalculateEffectiveSettings/main.go index 11e92ba9bbd..9f8bbbb23f5 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchCalculateEffectiveSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchCalculateEffectiveSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_BatchCalculateEffectiveSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_BatchCalculateEffectiveSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_BatchCalculateEffectiveSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_BatchCalculateEffectiveSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchGetSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchGetSettings/main.go index 5cd017d2226..1c07df5606c 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchGetSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/BatchGetSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_BatchGetSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_BatchGetSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_BatchGetSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_BatchGetSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveComponentSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveComponentSettings/main.go index 843cef787d7..d3678d1e321 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveComponentSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveComponentSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_CalculateEffectiveComponentSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_CalculateEffectiveComponentSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_CalculateEffectiveComponentSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_CalculateEffectiveComponentSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveSettings/main.go index 06ed06bbeeb..8d686e9774a 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/CalculateEffectiveSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_CalculateEffectiveSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_CalculateEffectiveSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_CalculateEffectiveSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_CalculateEffectiveSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetComponentSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetComponentSettings/main.go index 8a66db9c4a9..0966be75765 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetComponentSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetComponentSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_GetComponentSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_GetComponentSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_GetComponentSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_GetComponentSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetServiceAccount/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetServiceAccount/main.go index f4b2414b9a1..3e1b08682ab 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetServiceAccount/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetServiceAccount/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_GetServiceAccount] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_GetServiceAccount_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_GetServiceAccount] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_GetServiceAccount_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetSettings/main.go index c1ea67cc900..f4153c0a6c7 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/GetSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_GetSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_GetSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_GetSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_GetSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListComponents/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListComponents/main.go index 8a921e5b010..57d433baeed 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListComponents/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListComponents/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ListComponents] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_ListComponents_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ListComponents] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_ListComponents_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListDetectors/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListDetectors/main.go index 4e3ba7a7630..d51a16b77e2 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListDetectors/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ListDetectors/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ListDetectors] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_ListDetectors_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ListDetectors] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_ListDetectors_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/NewSecurityCenterSettingsClient/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/NewSecurityCenterSettingsClient/main.go deleted file mode 100644 index 1415efbdc40..00000000000 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/NewSecurityCenterSettingsClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_NewSecurityCenterSettingsClient] - -package main - -import ( - "context" - - settings "cloud.google.com/go/securitycenter/settings/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := settings.NewSecurityCenterSettingsClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_NewSecurityCenterSettingsClient] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetComponentSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetComponentSettings/main.go index 5289f933d5f..0194c40c49f 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetComponentSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetComponentSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ResetComponentSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_ResetComponentSettings_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ResetComponentSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_ResetComponentSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetSettings/main.go index 5b13556a2c2..0d66be62ff1 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/ResetSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ResetSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_ResetSettings_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_ResetSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_ResetSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateComponentSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateComponentSettings/main.go index cc6e31a9577..f01e355950c 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateComponentSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateComponentSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_UpdateComponentSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_UpdateComponentSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_UpdateComponentSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_UpdateComponentSettings_sync] diff --git a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateSettings/main.go b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateSettings/main.go index bb2039c1cdd..4c2bd0801b7 100644 --- a/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateSettings/main.go +++ b/internal/generated/snippets/securitycenter/settings/apiv1beta1/SecurityCenterSettingsClient/UpdateSettings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_UpdateSettings] +// [START securitycenter_v1beta1_generated_SecurityCenterSettingsService_UpdateSettings_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END securitycenter_generated_securitycenter_settings_apiv1beta1_SecurityCenterSettingsClient_UpdateSettings] +// [END securitycenter_v1beta1_generated_SecurityCenterSettingsService_UpdateSettings_sync] diff --git a/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/AllocateQuota/main.go b/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/AllocateQuota/main.go index c7463767624..6a3b4400f1d 100644 --- a/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/AllocateQuota/main.go +++ b/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/AllocateQuota/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicecontrol_generated_servicecontrol_apiv1_QuotaControllerClient_AllocateQuota] +// [START servicecontrol_v1_generated_QuotaController_AllocateQuota_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicecontrol_generated_servicecontrol_apiv1_QuotaControllerClient_AllocateQuota] +// [END servicecontrol_v1_generated_QuotaController_AllocateQuota_sync] diff --git a/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/NewQuotaControllerClient/main.go b/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/NewQuotaControllerClient/main.go deleted file mode 100644 index 09ff9f522e7..00000000000 --- a/internal/generated/snippets/servicecontrol/apiv1/QuotaControllerClient/NewQuotaControllerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicecontrol_generated_servicecontrol_apiv1_NewQuotaControllerClient] - -package main - -import ( - "context" - - servicecontrol "cloud.google.com/go/servicecontrol/apiv1" -) - -func main() { - ctx := context.Background() - c, err := servicecontrol.NewQuotaControllerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicecontrol_generated_servicecontrol_apiv1_NewQuotaControllerClient] diff --git a/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Check/main.go b/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Check/main.go index fa517564f3e..de845e00c59 100644 --- a/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Check/main.go +++ b/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Check/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicecontrol_generated_servicecontrol_apiv1_ServiceControllerClient_Check] +// [START servicecontrol_v1_generated_ServiceController_Check_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicecontrol_generated_servicecontrol_apiv1_ServiceControllerClient_Check] +// [END servicecontrol_v1_generated_ServiceController_Check_sync] diff --git a/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/NewServiceControllerClient/main.go b/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/NewServiceControllerClient/main.go deleted file mode 100644 index 99a880fe1e3..00000000000 --- a/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/NewServiceControllerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicecontrol_generated_servicecontrol_apiv1_NewServiceControllerClient] - -package main - -import ( - "context" - - servicecontrol "cloud.google.com/go/servicecontrol/apiv1" -) - -func main() { - ctx := context.Background() - c, err := servicecontrol.NewServiceControllerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicecontrol_generated_servicecontrol_apiv1_NewServiceControllerClient] diff --git a/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Report/main.go b/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Report/main.go index d519e8440c9..ddb5423c666 100644 --- a/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Report/main.go +++ b/internal/generated/snippets/servicecontrol/apiv1/ServiceControllerClient/Report/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicecontrol_generated_servicecontrol_apiv1_ServiceControllerClient_Report] +// [START servicecontrol_v1_generated_ServiceController_Report_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicecontrol_generated_servicecontrol_apiv1_ServiceControllerClient_Report] +// [END servicecontrol_v1_generated_ServiceController_Report_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/LookupClient/NewLookupClient/main.go b/internal/generated/snippets/servicedirectory/apiv1/LookupClient/NewLookupClient/main.go deleted file mode 100644 index 046bf4f3771..00000000000 --- a/internal/generated/snippets/servicedirectory/apiv1/LookupClient/NewLookupClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicedirectory_generated_servicedirectory_apiv1_NewLookupClient] - -package main - -import ( - "context" - - servicedirectory "cloud.google.com/go/servicedirectory/apiv1" -) - -func main() { - ctx := context.Background() - c, err := servicedirectory.NewLookupClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicedirectory_generated_servicedirectory_apiv1_NewLookupClient] diff --git a/internal/generated/snippets/servicedirectory/apiv1/LookupClient/ResolveService/main.go b/internal/generated/snippets/servicedirectory/apiv1/LookupClient/ResolveService/main.go index 7acba336db3..713801fdd1a 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/LookupClient/ResolveService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/LookupClient/ResolveService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_LookupClient_ResolveService] +// [START servicedirectory_v1_generated_LookupService_ResolveService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_LookupClient_ResolveService] +// [END servicedirectory_v1_generated_LookupService_ResolveService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateEndpoint/main.go index 57549e820d9..9cb5ed7758d 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_CreateEndpoint] +// [START servicedirectory_v1_generated_RegistrationService_CreateEndpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_CreateEndpoint] +// [END servicedirectory_v1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateNamespace/main.go index b9fd13152ec..de29a010578 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_CreateNamespace] +// [START servicedirectory_v1_generated_RegistrationService_CreateNamespace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_CreateNamespace] +// [END servicedirectory_v1_generated_RegistrationService_CreateNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateService/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateService/main.go index 3be99685960..723a0479662 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/CreateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_CreateService] +// [START servicedirectory_v1_generated_RegistrationService_CreateService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_CreateService] +// [END servicedirectory_v1_generated_RegistrationService_CreateService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteEndpoint/main.go index 822fe2aacf4..43a4a156e01 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_DeleteEndpoint] +// [START servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_DeleteEndpoint] +// [END servicedirectory_v1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteNamespace/main.go index 4000bad97b2..7b98381057f 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_DeleteNamespace] +// [START servicedirectory_v1_generated_RegistrationService_DeleteNamespace_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_DeleteNamespace] +// [END servicedirectory_v1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteService/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteService/main.go index 2e0f512be03..341d36e6858 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_DeleteService] +// [START servicedirectory_v1_generated_RegistrationService_DeleteService_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_DeleteService] +// [END servicedirectory_v1_generated_RegistrationService_DeleteService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetEndpoint/main.go index 810995f163c..2d61a334158 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetEndpoint] +// [START servicedirectory_v1_generated_RegistrationService_GetEndpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetEndpoint] +// [END servicedirectory_v1_generated_RegistrationService_GetEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetIamPolicy/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetIamPolicy/main.go index ee94c2fb899..3aa49c0426d 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetIamPolicy] +// [START servicedirectory_v1_generated_RegistrationService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetIamPolicy] +// [END servicedirectory_v1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetNamespace/main.go index 460d1ab79d4..536dd1a2024 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetNamespace] +// [START servicedirectory_v1_generated_RegistrationService_GetNamespace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetNamespace] +// [END servicedirectory_v1_generated_RegistrationService_GetNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetService/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetService/main.go index 03da6bad9d9..15579dbcdce 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetService] +// [START servicedirectory_v1_generated_RegistrationService_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_GetService] +// [END servicedirectory_v1_generated_RegistrationService_GetService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListEndpoints/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListEndpoints/main.go index e0d1bd0f3d9..08d5c842d2e 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListEndpoints/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListEndpoints/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_ListEndpoints] +// [START servicedirectory_v1_generated_RegistrationService_ListEndpoints_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_ListEndpoints] +// [END servicedirectory_v1_generated_RegistrationService_ListEndpoints_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListNamespaces/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListNamespaces/main.go index f5aa5a9930a..e3c1115317f 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListNamespaces/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListNamespaces/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_ListNamespaces] +// [START servicedirectory_v1_generated_RegistrationService_ListNamespaces_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_ListNamespaces] +// [END servicedirectory_v1_generated_RegistrationService_ListNamespaces_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListServices/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListServices/main.go index ea7866e1c8f..85663aeee51 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListServices/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_ListServices] +// [START servicedirectory_v1_generated_RegistrationService_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_ListServices] +// [END servicedirectory_v1_generated_RegistrationService_ListServices_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/NewRegistrationClient/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/NewRegistrationClient/main.go deleted file mode 100644 index a17f60b3ba0..00000000000 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/NewRegistrationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicedirectory_generated_servicedirectory_apiv1_NewRegistrationClient] - -package main - -import ( - "context" - - servicedirectory "cloud.google.com/go/servicedirectory/apiv1" -) - -func main() { - ctx := context.Background() - c, err := servicedirectory.NewRegistrationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicedirectory_generated_servicedirectory_apiv1_NewRegistrationClient] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/SetIamPolicy/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/SetIamPolicy/main.go index 14bd92c8aea..9872c04803c 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_SetIamPolicy] +// [START servicedirectory_v1_generated_RegistrationService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_SetIamPolicy] +// [END servicedirectory_v1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/TestIamPermissions/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/TestIamPermissions/main.go index 402c458eb70..85e9279f113 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_TestIamPermissions] +// [START servicedirectory_v1_generated_RegistrationService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_TestIamPermissions] +// [END servicedirectory_v1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateEndpoint/main.go index a19bb54ed65..ab380dfdf17 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_UpdateEndpoint] +// [START servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_UpdateEndpoint] +// [END servicedirectory_v1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateNamespace/main.go index db606043d6a..e6efe605996 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_UpdateNamespace] +// [START servicedirectory_v1_generated_RegistrationService_UpdateNamespace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_UpdateNamespace] +// [END servicedirectory_v1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateService/main.go b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateService/main.go index 8ec7b11e4b1..75c828701ff 100644 --- a/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1/RegistrationClient/UpdateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_UpdateService] +// [START servicedirectory_v1_generated_RegistrationService_UpdateService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1_RegistrationClient_UpdateService] +// [END servicedirectory_v1_generated_RegistrationService_UpdateService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/NewLookupClient/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/NewLookupClient/main.go deleted file mode 100644 index a4162877cd4..00000000000 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/NewLookupClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicedirectory_generated_servicedirectory_apiv1beta1_NewLookupClient] - -package main - -import ( - "context" - - servicedirectory "cloud.google.com/go/servicedirectory/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := servicedirectory.NewLookupClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicedirectory_generated_servicedirectory_apiv1beta1_NewLookupClient] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/ResolveService/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/ResolveService/main.go index c49f5cd7e60..cf53a5eddbb 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/ResolveService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/LookupClient/ResolveService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_LookupClient_ResolveService] +// [START servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_LookupClient_ResolveService] +// [END servicedirectory_v1beta1_generated_LookupService_ResolveService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateEndpoint/main.go index fa5e01ea52b..0db19b8d5c0 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_CreateEndpoint] +// [START servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_CreateEndpoint] +// [END servicedirectory_v1beta1_generated_RegistrationService_CreateEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateNamespace/main.go index 839f71f82c4..d36259384c8 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_CreateNamespace] +// [START servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_CreateNamespace] +// [END servicedirectory_v1beta1_generated_RegistrationService_CreateNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateService/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateService/main.go index 5312f27b1e1..81fcd069814 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/CreateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_CreateService] +// [START servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_CreateService] +// [END servicedirectory_v1beta1_generated_RegistrationService_CreateService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteEndpoint/main.go index 1291bea4635..17385d47658 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_DeleteEndpoint] +// [START servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_DeleteEndpoint] +// [END servicedirectory_v1beta1_generated_RegistrationService_DeleteEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteNamespace/main.go index 27d4ec10e5a..823d9b12903 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_DeleteNamespace] +// [START servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_DeleteNamespace] +// [END servicedirectory_v1beta1_generated_RegistrationService_DeleteNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteService/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteService/main.go index 397e4a6359f..6405a2727f1 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_DeleteService] +// [START servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_DeleteService] +// [END servicedirectory_v1beta1_generated_RegistrationService_DeleteService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetEndpoint/main.go index d1558f46861..94078c3f9b3 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetEndpoint] +// [START servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetEndpoint] +// [END servicedirectory_v1beta1_generated_RegistrationService_GetEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetIamPolicy/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetIamPolicy/main.go index 837b96163f2..a3edad7819c 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetIamPolicy] +// [START servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetIamPolicy] +// [END servicedirectory_v1beta1_generated_RegistrationService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetNamespace/main.go index 2fd27d38a93..e252aad4f39 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetNamespace] +// [START servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetNamespace] +// [END servicedirectory_v1beta1_generated_RegistrationService_GetNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetService/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetService/main.go index 34c656b5e14..baee0dff2bd 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetService] +// [START servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_GetService] +// [END servicedirectory_v1beta1_generated_RegistrationService_GetService_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListEndpoints/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListEndpoints/main.go index caefab0a844..6f0309e5062 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListEndpoints/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListEndpoints/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_ListEndpoints] +// [START servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_ListEndpoints] +// [END servicedirectory_v1beta1_generated_RegistrationService_ListEndpoints_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListNamespaces/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListNamespaces/main.go index a28e317401f..f242f5547df 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListNamespaces/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListNamespaces/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_ListNamespaces] +// [START servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_ListNamespaces] +// [END servicedirectory_v1beta1_generated_RegistrationService_ListNamespaces_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListServices/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListServices/main.go index a103ab42891..7942cd87009 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListServices/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_ListServices] +// [START servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_ListServices] +// [END servicedirectory_v1beta1_generated_RegistrationService_ListServices_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/NewRegistrationClient/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/NewRegistrationClient/main.go deleted file mode 100644 index 3d8c4084e4a..00000000000 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/NewRegistrationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicedirectory_generated_servicedirectory_apiv1beta1_NewRegistrationClient] - -package main - -import ( - "context" - - servicedirectory "cloud.google.com/go/servicedirectory/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := servicedirectory.NewRegistrationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicedirectory_generated_servicedirectory_apiv1beta1_NewRegistrationClient] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/SetIamPolicy/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/SetIamPolicy/main.go index a739ae2d730..fd9d25470fb 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_SetIamPolicy] +// [START servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_SetIamPolicy] +// [END servicedirectory_v1beta1_generated_RegistrationService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/TestIamPermissions/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/TestIamPermissions/main.go index 596da305e22..11a772df606 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_TestIamPermissions] +// [START servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_TestIamPermissions] +// [END servicedirectory_v1beta1_generated_RegistrationService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateEndpoint/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateEndpoint/main.go index 8029ebd1d81..30fd910fc8e 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateEndpoint/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateEndpoint/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_UpdateEndpoint] +// [START servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_UpdateEndpoint] +// [END servicedirectory_v1beta1_generated_RegistrationService_UpdateEndpoint_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateNamespace/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateNamespace/main.go index d27b7c5ebd8..b2fe3e9f874 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateNamespace/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateNamespace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_UpdateNamespace] +// [START servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_UpdateNamespace] +// [END servicedirectory_v1beta1_generated_RegistrationService_UpdateNamespace_sync] diff --git a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateService/main.go b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateService/main.go index 9996f39a4a1..773e095359d 100644 --- a/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateService/main.go +++ b/internal/generated/snippets/servicedirectory/apiv1beta1/RegistrationClient/UpdateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_UpdateService] +// [START servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicedirectory_generated_servicedirectory_apiv1beta1_RegistrationClient_UpdateService] +// [END servicedirectory_v1beta1_generated_RegistrationService_UpdateService_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateService/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateService/main.go index 98af37e9f81..f3324a4c0a1 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateService/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_CreateService] +// [START servicemanagement_v1_generated_ServiceManager_CreateService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_CreateService] +// [END servicemanagement_v1_generated_ServiceManager_CreateService_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceConfig/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceConfig/main.go index 8247057b6e3..0eef66c13cb 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceConfig/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_CreateServiceConfig] +// [START servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_CreateServiceConfig] +// [END servicemanagement_v1_generated_ServiceManager_CreateServiceConfig_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceRollout/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceRollout/main.go index d5d5e6aefc7..ed836ecccf2 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceRollout/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/CreateServiceRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_CreateServiceRollout] +// [START servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_CreateServiceRollout] +// [END servicemanagement_v1_generated_ServiceManager_CreateServiceRollout_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DeleteService/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DeleteService/main.go index 95e778e23be..cdcff289d2d 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DeleteService/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_DeleteService] +// [START servicemanagement_v1_generated_ServiceManager_DeleteService_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_DeleteService] +// [END servicemanagement_v1_generated_ServiceManager_DeleteService_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DisableService/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DisableService/main.go index a6cb207975b..1a49a3de07f 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DisableService/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/DisableService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_DisableService] +// [START servicemanagement_v1_generated_ServiceManager_DisableService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_DisableService] +// [END servicemanagement_v1_generated_ServiceManager_DisableService_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/EnableService/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/EnableService/main.go index c65037b3aa7..34eb2abab5e 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/EnableService/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/EnableService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_EnableService] +// [START servicemanagement_v1_generated_ServiceManager_EnableService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_EnableService] +// [END servicemanagement_v1_generated_ServiceManager_EnableService_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GenerateConfigReport/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GenerateConfigReport/main.go index c38795cc2d1..8b0b67c51c6 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GenerateConfigReport/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GenerateConfigReport/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GenerateConfigReport] +// [START servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GenerateConfigReport] +// [END servicemanagement_v1_generated_ServiceManager_GenerateConfigReport_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetService/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetService/main.go index 0f6b5029d5b..f6b85c4bc1d 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetService/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GetService] +// [START servicemanagement_v1_generated_ServiceManager_GetService_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GetService] +// [END servicemanagement_v1_generated_ServiceManager_GetService_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceConfig/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceConfig/main.go index 1dbddcc2395..d869c0e9029 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceConfig/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GetServiceConfig] +// [START servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GetServiceConfig] +// [END servicemanagement_v1_generated_ServiceManager_GetServiceConfig_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceRollout/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceRollout/main.go index b321aa73571..1d7a1101caf 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceRollout/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/GetServiceRollout/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GetServiceRollout] +// [START servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_GetServiceRollout] +// [END servicemanagement_v1_generated_ServiceManager_GetServiceRollout_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceConfigs/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceConfigs/main.go index b1c9f177bcc..2c72d9b808e 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceConfigs/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_ListServiceConfigs] +// [START servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_ListServiceConfigs] +// [END servicemanagement_v1_generated_ServiceManager_ListServiceConfigs_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceRollouts/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceRollouts/main.go index 7327c8ccb69..d0b6461ebe6 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceRollouts/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServiceRollouts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_ListServiceRollouts] +// [START servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_ListServiceRollouts] +// [END servicemanagement_v1_generated_ServiceManager_ListServiceRollouts_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServices/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServices/main.go index 3daebfb9de2..aceac256993 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServices/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/ListServices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_ListServices] +// [START servicemanagement_v1_generated_ServiceManager_ListServices_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_ListServices] +// [END servicemanagement_v1_generated_ServiceManager_ListServices_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/NewServiceManagerClient/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/NewServiceManagerClient/main.go deleted file mode 100644 index 3fca369350c..00000000000 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/NewServiceManagerClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START servicemanagement_generated_servicemanagement_apiv1_NewServiceManagerClient] - -package main - -import ( - "context" - - servicemanagement "cloud.google.com/go/servicemanagement/apiv1" -) - -func main() { - ctx := context.Background() - c, err := servicemanagement.NewServiceManagerClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END servicemanagement_generated_servicemanagement_apiv1_NewServiceManagerClient] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/SubmitConfigSource/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/SubmitConfigSource/main.go index ddb64f82056..bec06b114ae 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/SubmitConfigSource/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/SubmitConfigSource/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_SubmitConfigSource] +// [START servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_SubmitConfigSource] +// [END servicemanagement_v1_generated_ServiceManager_SubmitConfigSource_sync] diff --git a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/UndeleteService/main.go b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/UndeleteService/main.go index bb593363cd5..aa5331fd3e2 100644 --- a/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/UndeleteService/main.go +++ b/internal/generated/snippets/servicemanagement/apiv1/ServiceManagerClient/UndeleteService/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_UndeleteService] +// [START servicemanagement_v1_generated_ServiceManager_UndeleteService_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END servicemanagement_generated_servicemanagement_apiv1_ServiceManagerClient_UndeleteService] +// [END servicemanagement_v1_generated_ServiceManager_UndeleteService_sync] diff --git a/internal/generated/snippets/spanner/Client/Apply/main.go b/internal/generated/snippets/spanner/Client/Apply/main.go deleted file mode 100644 index 1889545da24..00000000000 --- a/internal/generated/snippets/spanner/Client/Apply/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Client_Apply] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - m := spanner.Update("Users", []string{"name", "email"}, []interface{}{"alice", "a@example.com"}) - _, err = client.Apply(ctx, []*spanner.Mutation{m}) - if err != nil { - // TODO: Handle error. - } -} - -// [END spanner_generated_spanner_Client_Apply] diff --git a/internal/generated/snippets/spanner/Client/BatchReadOnlyTransaction/main.go b/internal/generated/snippets/spanner/Client/BatchReadOnlyTransaction/main.go deleted file mode 100644 index 61cc13f0e76..00000000000 --- a/internal/generated/snippets/spanner/Client/BatchReadOnlyTransaction/main.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Client_BatchReadOnlyTransaction] - -package main - -import ( - "context" - "sync" - - "cloud.google.com/go/spanner" - "google.golang.org/api/iterator" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - var ( - client *spanner.Client - txn *spanner.BatchReadOnlyTransaction - err error - ) - if client, err = spanner.NewClient(ctx, myDB); err != nil { - // TODO: Handle error. - } - defer client.Close() - if txn, err = client.BatchReadOnlyTransaction(ctx, spanner.StrongRead()); err != nil { - // TODO: Handle error. - } - defer txn.Close() - - // Singer represents the elements in a row from the Singers table. - type Singer struct { - SingerID int64 - FirstName string - LastName string - SingerInfo []byte - } - stmt := spanner.Statement{SQL: "SELECT * FROM Singers;"} - partitions, err := txn.PartitionQuery(ctx, stmt, spanner.PartitionOptions{}) - if err != nil { - // TODO: Handle error. - } - // Note: here we use multiple goroutines, but you should use separate - // processes/machines. - wg := sync.WaitGroup{} - for i, p := range partitions { - wg.Add(1) - go func(i int, p *spanner.Partition) { - defer wg.Done() - iter := txn.Execute(ctx, p) - defer iter.Stop() - for { - row, err := iter.Next() - if err == iterator.Done { - break - } else if err != nil { - // TODO: Handle error. - } - var s Singer - if err := row.ToStruct(&s); err != nil { - // TODO: Handle error. - } - _ = s // TODO: Process the row. - } - }(i, p) - } - wg.Wait() -} - -// [END spanner_generated_spanner_Client_BatchReadOnlyTransaction] diff --git a/internal/generated/snippets/spanner/Client/NewClient/main.go b/internal/generated/snippets/spanner/Client/NewClient/main.go deleted file mode 100644 index bd26c449506..00000000000 --- a/internal/generated/snippets/spanner/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -func main() { - ctx := context.Background() - const myDB = "projects/my-project/instances/my-instance/database/my-db" - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - _ = client // TODO: Use client. -} - -// [END spanner_generated_spanner_NewClient] diff --git a/internal/generated/snippets/spanner/Client/NewClientWithConfig/main.go b/internal/generated/snippets/spanner/Client/NewClientWithConfig/main.go deleted file mode 100644 index 5fb01073cc7..00000000000 --- a/internal/generated/snippets/spanner/Client/NewClientWithConfig/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_NewClientWithConfig] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -func main() { - ctx := context.Background() - const myDB = "projects/my-project/instances/my-instance/database/my-db" - client, err := spanner.NewClientWithConfig(ctx, myDB, spanner.ClientConfig{ - NumChannels: 10, - }) - if err != nil { - // TODO: Handle error. - } - _ = client // TODO: Use client. - client.Close() // Close client when done. -} - -// [END spanner_generated_spanner_NewClientWithConfig] diff --git a/internal/generated/snippets/spanner/Client/ReadOnlyTransaction/main.go b/internal/generated/snippets/spanner/Client/ReadOnlyTransaction/main.go deleted file mode 100644 index 2ffd8d73186..00000000000 --- a/internal/generated/snippets/spanner/Client/ReadOnlyTransaction/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Client_ReadOnlyTransaction] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - t := client.ReadOnlyTransaction() - defer t.Close() - // TODO: Read with t using Read, ReadRow, ReadUsingIndex, or Query. -} - -// [END spanner_generated_spanner_Client_ReadOnlyTransaction] diff --git a/internal/generated/snippets/spanner/Client/ReadWriteTransaction/main.go b/internal/generated/snippets/spanner/Client/ReadWriteTransaction/main.go deleted file mode 100644 index 306355fa8b3..00000000000 --- a/internal/generated/snippets/spanner/Client/ReadWriteTransaction/main.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Client_ReadWriteTransaction] - -package main - -import ( - "context" - "errors" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - _, err = client.ReadWriteTransaction(ctx, func(ctx context.Context, txn *spanner.ReadWriteTransaction) error { - var balance int64 - row, err := txn.ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"balance"}) - if err != nil { - // This function will be called again if this is an IsAborted error. - return err - } - if err := row.Column(0, &balance); err != nil { - return err - } - - if balance <= 10 { - return errors.New("insufficient funds in account") - } - balance -= 10 - m := spanner.Update("Accounts", []string{"user", "balance"}, []interface{}{"alice", balance}) - // The buffered mutation will be committed. If the commit fails with an - // IsAborted error, this function will be called again. - return txn.BufferWrite([]*spanner.Mutation{m}) - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END spanner_generated_spanner_Client_ReadWriteTransaction] diff --git a/internal/generated/snippets/spanner/Client/Single/main.go b/internal/generated/snippets/spanner/Client/Single/main.go deleted file mode 100644 index 65a29b328f1..00000000000 --- a/internal/generated/snippets/spanner/Client/Single/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Client_Single] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - iter := client.Single().Query(ctx, spanner.NewStatement("SELECT FirstName FROM Singers")) - _ = iter // TODO: iterate using Next or Do. -} - -// [END spanner_generated_spanner_Client_Single] diff --git a/internal/generated/snippets/spanner/GenericColumnValue/Decode/main.go b/internal/generated/snippets/spanner/GenericColumnValue/Decode/main.go deleted file mode 100644 index e7cd2b87249..00000000000 --- a/internal/generated/snippets/spanner/GenericColumnValue/Decode/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_GenericColumnValue_Decode] - -package main - -import ( - "fmt" - - "cloud.google.com/go/spanner" - sppb "google.golang.org/genproto/googleapis/spanner/v1" -) - -func main() { - // In real applications, rows can be retrieved by methods like client.Single().ReadRow(). - row, err := spanner.NewRow([]string{"intCol", "strCol"}, []interface{}{42, "my-text"}) - if err != nil { - // TODO: Handle error. - } - for i := 0; i < row.Size(); i++ { - var col spanner.GenericColumnValue - if err := row.Column(i, &col); err != nil { - // TODO: Handle error. - } - switch col.Type.Code { - case sppb.TypeCode_INT64: - var v int64 - if err := col.Decode(&v); err != nil { - // TODO: Handle error. - } - fmt.Println("int", v) - case sppb.TypeCode_STRING: - var v string - if err := col.Decode(&v); err != nil { - // TODO: Handle error. - } - fmt.Println("string", v) - } - } -} - -// [END spanner_generated_spanner_GenericColumnValue_Decode] diff --git a/internal/generated/snippets/spanner/KeySet/KeySets/main.go b/internal/generated/snippets/spanner/KeySet/KeySets/main.go deleted file mode 100644 index 38470177612..00000000000 --- a/internal/generated/snippets/spanner/KeySet/KeySets/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_KeySets] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" - "google.golang.org/api/iterator" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - // Get some rows from the Accounts table using a secondary index. In this case we get all users who are in Georgia. - iter := client.Single().ReadUsingIndex(context.Background(), "Accounts", "idx_state", spanner.Key{"GA"}, []string{"state"}) - - // Create a empty KeySet by calling the KeySets function with no parameters. - ks := spanner.KeySets() - - // Loop the results of a previous query iterator. - for { - row, err := iter.Next() - if err == iterator.Done { - break - } else if err != nil { - // TODO: Handle error. - } - var id string - err = row.ColumnByName("User", &id) - if err != nil { - // TODO: Handle error. - } - ks = spanner.KeySets(spanner.KeySets(spanner.Key{id}, ks)) - } - - _ = ks //TODO: Go use the KeySet in another query. - -} - -// [END spanner_generated_spanner_KeySets] diff --git a/internal/generated/snippets/spanner/Mutation/Delete/keyRange/main.go b/internal/generated/snippets/spanner/Mutation/Delete/keyRange/main.go deleted file mode 100644 index 6d48561e8ac..00000000000 --- a/internal/generated/snippets/spanner/Mutation/Delete/keyRange/main.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Delete_keyRange] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - m := spanner.Delete("Users", spanner.KeyRange{ - Start: spanner.Key{"alice"}, - End: spanner.Key{"bob"}, - Kind: spanner.ClosedClosed, - }) - _ = m // TODO: use with Client.Apply or in a ReadWriteTransaction. -} - -// [END spanner_generated_spanner_Delete_keyRange] diff --git a/internal/generated/snippets/spanner/Mutation/Delete/main.go b/internal/generated/snippets/spanner/Mutation/Delete/main.go deleted file mode 100644 index 1f8b19a9021..00000000000 --- a/internal/generated/snippets/spanner/Mutation/Delete/main.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Delete] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - m := spanner.Delete("Users", spanner.Key{"alice"}) - _ = m // TODO: use with Client.Apply or in a ReadWriteTransaction. -} - -// [END spanner_generated_spanner_Delete] diff --git a/internal/generated/snippets/spanner/Mutation/Insert/main.go b/internal/generated/snippets/spanner/Mutation/Insert/main.go deleted file mode 100644 index d0db671febc..00000000000 --- a/internal/generated/snippets/spanner/Mutation/Insert/main.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Insert] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - m := spanner.Insert("Users", []string{"name", "email"}, []interface{}{"alice", "a@example.com"}) - _ = m // TODO: use with Client.Apply or in a ReadWriteTransaction. -} - -// [END spanner_generated_spanner_Insert] diff --git a/internal/generated/snippets/spanner/Mutation/InsertMap/main.go b/internal/generated/snippets/spanner/Mutation/InsertMap/main.go deleted file mode 100644 index 659482ee5d7..00000000000 --- a/internal/generated/snippets/spanner/Mutation/InsertMap/main.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_InsertMap] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - m := spanner.InsertMap("Users", map[string]interface{}{ - "name": "alice", - "email": "a@example.com", - }) - _ = m // TODO: use with Client.Apply or in a ReadWriteTransaction. -} - -// [END spanner_generated_spanner_InsertMap] diff --git a/internal/generated/snippets/spanner/Mutation/InsertStruct/main.go b/internal/generated/snippets/spanner/Mutation/InsertStruct/main.go deleted file mode 100644 index c6f0912301c..00000000000 --- a/internal/generated/snippets/spanner/Mutation/InsertStruct/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_InsertStruct] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - type User struct { - Name, Email string - } - u := User{Name: "alice", Email: "a@example.com"} - m, err := spanner.InsertStruct("Users", u) - if err != nil { - // TODO: Handle error. - } - _ = m // TODO: use with Client.Apply or in a ReadWriteTransaction. -} - -// [END spanner_generated_spanner_InsertStruct] diff --git a/internal/generated/snippets/spanner/Mutation/Update/main.go b/internal/generated/snippets/spanner/Mutation/Update/main.go deleted file mode 100644 index 634272e05e6..00000000000 --- a/internal/generated/snippets/spanner/Mutation/Update/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Update] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - _, err = client.ReadWriteTransaction(ctx, func(ctx context.Context, txn *spanner.ReadWriteTransaction) error { - row, err := txn.ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"balance"}) - if err != nil { - return err - } - var balance int64 - if err := row.Column(0, &balance); err != nil { - return err - } - return txn.BufferWrite([]*spanner.Mutation{ - spanner.Update("Accounts", []string{"user", "balance"}, []interface{}{"alice", balance + 10}), - }) - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END spanner_generated_spanner_Update] diff --git a/internal/generated/snippets/spanner/Mutation/UpdateMap/main.go b/internal/generated/snippets/spanner/Mutation/UpdateMap/main.go deleted file mode 100644 index a4b8ee0a8a3..00000000000 --- a/internal/generated/snippets/spanner/Mutation/UpdateMap/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_UpdateMap] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - _, err = client.ReadWriteTransaction(ctx, func(ctx context.Context, txn *spanner.ReadWriteTransaction) error { - row, err := txn.ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"balance"}) - if err != nil { - return err - } - var balance int64 - if err := row.Column(0, &balance); err != nil { - return err - } - return txn.BufferWrite([]*spanner.Mutation{ - spanner.UpdateMap("Accounts", map[string]interface{}{ - "user": "alice", - "balance": balance + 10, - }), - }) - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END spanner_generated_spanner_UpdateMap] diff --git a/internal/generated/snippets/spanner/Mutation/UpdateStruct/main.go b/internal/generated/snippets/spanner/Mutation/UpdateStruct/main.go deleted file mode 100644 index e84e05c65c1..00000000000 --- a/internal/generated/snippets/spanner/Mutation/UpdateStruct/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_UpdateStruct] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - type account struct { - User string `spanner:"user"` - Balance int64 `spanner:"balance"` - } - _, err = client.ReadWriteTransaction(ctx, func(ctx context.Context, txn *spanner.ReadWriteTransaction) error { - row, err := txn.ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"balance"}) - if err != nil { - return err - } - var balance int64 - if err := row.Column(0, &balance); err != nil { - return err - } - m, err := spanner.UpdateStruct("Accounts", account{ - User: "alice", - Balance: balance + 10, - }) - if err != nil { - return err - } - return txn.BufferWrite([]*spanner.Mutation{m}) - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END spanner_generated_spanner_UpdateStruct] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/Query/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/Query/main.go deleted file mode 100644 index c8a9817fbc3..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/Query/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_Query] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - iter := client.Single().Query(ctx, spanner.NewStatement("SELECT FirstName FROM Singers")) - _ = iter // TODO: iterate using Next or Do. -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_Query] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/Read/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/Read/main.go deleted file mode 100644 index 4dd27c6cebd..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/Read/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_Read] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - iter := client.Single().Read(ctx, "Users", - spanner.KeySets(spanner.Key{"alice"}, spanner.Key{"bob"}), - []string{"name", "email"}) - _ = iter // TODO: iterate using Next or Do. -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_Read] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadRow/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadRow/main.go deleted file mode 100644 index 63836f829c8..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadRow/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_ReadRow] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Users", spanner.Key{"alice"}, - []string{"name", "email"}) - if err != nil { - // TODO: Handle error. - } - _ = row // TODO: use row -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_ReadRow] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadUsingIndex/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadUsingIndex/main.go deleted file mode 100644 index 4bde5e6e105..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadUsingIndex/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_ReadUsingIndex] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - iter := client.Single().ReadUsingIndex(ctx, "Users", - "UsersByEmail", - spanner.KeySets(spanner.Key{"a@example.com"}, spanner.Key{"b@example.com"}), - []string{"name", "email"}) - _ = iter // TODO: iterate using Next or Do. -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_ReadUsingIndex] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadWithOptions/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadWithOptions/main.go deleted file mode 100644 index 757d66483ac..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/ReadWithOptions/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_ReadWithOptions] - -package main - -import ( - "context" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - // Use an index, and limit to 100 rows at most. - iter := client.Single().ReadWithOptions(ctx, "Users", - spanner.KeySets(spanner.Key{"a@example.com"}, spanner.Key{"b@example.com"}), - []string{"name", "email"}, &spanner.ReadOptions{ - Index: "UsersByEmail", - Limit: 100, - }) - _ = iter // TODO: iterate using Next or Do. -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_ReadWithOptions] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/Timestamp/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/Timestamp/main.go deleted file mode 100644 index c9a99a495ef..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/Timestamp/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_Timestamp] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - txn := client.Single() - row, err := txn.ReadRow(ctx, "Users", spanner.Key{"alice"}, - []string{"name", "email"}) - if err != nil { - // TODO: Handle error. - } - readTimestamp, err := txn.Timestamp() - if err != nil { - // TODO: Handle error. - } - fmt.Println("read happened at", readTimestamp) - _ = row // TODO: use row -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_Timestamp] diff --git a/internal/generated/snippets/spanner/ReadOnlyTransaction/WithTimestampBound/main.go b/internal/generated/snippets/spanner/ReadOnlyTransaction/WithTimestampBound/main.go deleted file mode 100644 index e380f61729e..00000000000 --- a/internal/generated/snippets/spanner/ReadOnlyTransaction/WithTimestampBound/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_ReadOnlyTransaction_WithTimestampBound] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - txn := client.Single().WithTimestampBound(spanner.MaxStaleness(30 * time.Second)) - row, err := txn.ReadRow(ctx, "Users", spanner.Key{"alice"}, []string{"name", "email"}) - if err != nil { - // TODO: Handle error. - } - _ = row // TODO: use row - readTimestamp, err := txn.Timestamp() - if err != nil { - // TODO: Handle error. - } - fmt.Println("read happened at", readTimestamp) -} - -// [END spanner_generated_spanner_ReadOnlyTransaction_WithTimestampBound] diff --git a/internal/generated/snippets/spanner/ReadWriteStmtBasedTransaction/NewReadWriteStmtBasedTransaction/main.go b/internal/generated/snippets/spanner/ReadWriteStmtBasedTransaction/NewReadWriteStmtBasedTransaction/main.go deleted file mode 100644 index ebfd1883adb..00000000000 --- a/internal/generated/snippets/spanner/ReadWriteStmtBasedTransaction/NewReadWriteStmtBasedTransaction/main.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_NewReadWriteStmtBasedTransaction] - -package main - -import ( - "context" - "errors" - "time" - - "cloud.google.com/go/spanner" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - defer client.Close() - - f := func(tx *spanner.ReadWriteStmtBasedTransaction) error { - var balance int64 - row, err := tx.ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"balance"}) - if err != nil { - return err - } - if err := row.Column(0, &balance); err != nil { - return err - } - - if balance <= 10 { - return errors.New("insufficient funds in account") - } - balance -= 10 - m := spanner.Update("Accounts", []string{"user", "balance"}, []interface{}{"alice", balance}) - return tx.BufferWrite([]*spanner.Mutation{m}) - } - - for { - tx, err := spanner.NewReadWriteStmtBasedTransaction(ctx, client) - if err != nil { - // TODO: Handle error. - break - } - err = f(tx) - if err != nil && status.Code(err) != codes.Aborted { - tx.Rollback(ctx) - // TODO: Handle error. - break - } else if err == nil { - _, err = tx.Commit(ctx) - if err == nil { - break - } else if status.Code(err) != codes.Aborted { - // TODO: Handle error. - break - } - } - // Set a default sleep time if the server delay is absent. - delay := 10 * time.Millisecond - if serverDelay, hasServerDelay := spanner.ExtractRetryDelay(err); hasServerDelay { - delay = serverDelay - } - time.Sleep(delay) - } -} - -// [END spanner_generated_spanner_NewReadWriteStmtBasedTransaction] diff --git a/internal/generated/snippets/spanner/Row/ColumnByName/main.go b/internal/generated/snippets/spanner/Row/ColumnByName/main.go deleted file mode 100644 index d3f8a4af01d..00000000000 --- a/internal/generated/snippets/spanner/Row/ColumnByName/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_ColumnByName] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - var balance int64 - if err := row.ColumnByName("balance", &balance); err != nil { - // TODO: Handle error. - } - fmt.Println(balance) -} - -// [END spanner_generated_spanner_Row_ColumnByName] diff --git a/internal/generated/snippets/spanner/Row/ColumnIndex/main.go b/internal/generated/snippets/spanner/Row/ColumnIndex/main.go deleted file mode 100644 index e76f66bcffb..00000000000 --- a/internal/generated/snippets/spanner/Row/ColumnIndex/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_ColumnIndex] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - index, err := row.ColumnIndex("balance") - if err != nil { - // TODO: Handle error. - } - fmt.Println(index) -} - -// [END spanner_generated_spanner_Row_ColumnIndex] diff --git a/internal/generated/snippets/spanner/Row/ColumnName/main.go b/internal/generated/snippets/spanner/Row/ColumnName/main.go deleted file mode 100644 index 193050a4149..00000000000 --- a/internal/generated/snippets/spanner/Row/ColumnName/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_ColumnName] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - fmt.Println(row.ColumnName(1)) // "balance" -} - -// [END spanner_generated_spanner_Row_ColumnName] diff --git a/internal/generated/snippets/spanner/Row/ColumnNames/main.go b/internal/generated/snippets/spanner/Row/ColumnNames/main.go deleted file mode 100644 index bed753f9beb..00000000000 --- a/internal/generated/snippets/spanner/Row/ColumnNames/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_ColumnNames] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - fmt.Println(row.ColumnNames()) -} - -// [END spanner_generated_spanner_Row_ColumnNames] diff --git a/internal/generated/snippets/spanner/Row/Columns/main.go b/internal/generated/snippets/spanner/Row/Columns/main.go deleted file mode 100644 index 3be9af58cb0..00000000000 --- a/internal/generated/snippets/spanner/Row/Columns/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_Columns] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - var name string - var balance int64 - if err := row.Columns(&name, &balance); err != nil { - // TODO: Handle error. - } - fmt.Println(name, balance) -} - -// [END spanner_generated_spanner_Row_Columns] diff --git a/internal/generated/snippets/spanner/Row/Size/main.go b/internal/generated/snippets/spanner/Row/Size/main.go deleted file mode 100644 index 5d8cfd04846..00000000000 --- a/internal/generated/snippets/spanner/Row/Size/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_Size] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - fmt.Println(row.Size()) // 2 -} - -// [END spanner_generated_spanner_Row_Size] diff --git a/internal/generated/snippets/spanner/Row/ToStruct/main.go b/internal/generated/snippets/spanner/Row/ToStruct/main.go deleted file mode 100644 index fdcd6ef479c..00000000000 --- a/internal/generated/snippets/spanner/Row/ToStruct/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Row_ToStruct] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - row, err := client.Single().ReadRow(ctx, "Accounts", spanner.Key{"alice"}, []string{"name", "balance"}) - if err != nil { - // TODO: Handle error. - } - - type Account struct { - Name string - Balance int64 - } - - var acct Account - if err := row.ToStruct(&acct); err != nil { - // TODO: Handle error. - } - fmt.Println(acct) -} - -// [END spanner_generated_spanner_Row_ToStruct] diff --git a/internal/generated/snippets/spanner/RowIterator/Do/main.go b/internal/generated/snippets/spanner/RowIterator/Do/main.go deleted file mode 100644 index 4ab5fe5eb75..00000000000 --- a/internal/generated/snippets/spanner/RowIterator/Do/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_RowIterator_Do] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - iter := client.Single().Query(ctx, spanner.NewStatement("SELECT FirstName FROM Singers")) - err = iter.Do(func(r *spanner.Row) error { - var firstName string - if err := r.Column(0, &firstName); err != nil { - return err - } - fmt.Println(firstName) - return nil - }) - if err != nil { - // TODO: Handle error. - } -} - -// [END spanner_generated_spanner_RowIterator_Do] diff --git a/internal/generated/snippets/spanner/RowIterator/Next/main.go b/internal/generated/snippets/spanner/RowIterator/Next/main.go deleted file mode 100644 index 651d966a5db..00000000000 --- a/internal/generated/snippets/spanner/RowIterator/Next/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_RowIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/spanner" - "google.golang.org/api/iterator" -) - -const myDB = "projects/my-project/instances/my-instance/database/my-db" - -func main() { - ctx := context.Background() - client, err := spanner.NewClient(ctx, myDB) - if err != nil { - // TODO: Handle error. - } - iter := client.Single().Query(ctx, spanner.NewStatement("SELECT FirstName FROM Singers")) - defer iter.Stop() - for { - row, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - var firstName string - if err := row.Column(0, &firstName); err != nil { - // TODO: Handle error. - } - fmt.Println(firstName) - } -} - -// [END spanner_generated_spanner_RowIterator_Next] diff --git a/internal/generated/snippets/spanner/Statement/NewStatement/main.go b/internal/generated/snippets/spanner/Statement/NewStatement/main.go deleted file mode 100644 index 554486be6ce..00000000000 --- a/internal/generated/snippets/spanner/Statement/NewStatement/main.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_NewStatement] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - stmt := spanner.NewStatement("SELECT FirstName, LastName FROM SINGERS WHERE LastName >= @start") - stmt.Params["start"] = "Dylan" - // TODO: Use stmt in Query. -} - -// [END spanner_generated_spanner_NewStatement] diff --git a/internal/generated/snippets/spanner/Statement/NewStatement/structLiteral/main.go b/internal/generated/snippets/spanner/Statement/NewStatement/structLiteral/main.go deleted file mode 100644 index 54ed0d8a9a3..00000000000 --- a/internal/generated/snippets/spanner/Statement/NewStatement/structLiteral/main.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_NewStatement_structLiteral] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - stmt := spanner.Statement{ - SQL: `SELECT FirstName, LastName FROM SINGERS WHERE LastName = ("Lea", "Martin")`, - } - _ = stmt // TODO: Use stmt in Query. -} - -// [END spanner_generated_spanner_NewStatement_structLiteral] diff --git a/internal/generated/snippets/spanner/Statement/main.go b/internal/generated/snippets/spanner/Statement/main.go deleted file mode 100644 index 8905e9baebf..00000000000 --- a/internal/generated/snippets/spanner/Statement/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_Statement_regexpContains] - -package main - -import ( - "cloud.google.com/go/spanner" -) - -func main() { - // Search for accounts with valid emails using regexp as per: - // https://cloud.google.com/spanner/docs/functions-and-operators#regexp_contains - stmt := spanner.Statement{ - SQL: `SELECT * FROM users WHERE REGEXP_CONTAINS(email, @valid_email)`, - Params: map[string]interface{}{ - "valid_email": `\Q@\E`, - }, - } - _ = stmt // TODO: Use stmt in a query. -} - -// [END spanner_generated_spanner_Statement_regexpContains] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateBackup/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateBackup/main.go index 5e247f78458..8144e6dadf2 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateBackup/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_CreateBackup] +// [START spanner_v1_generated_DatabaseAdmin_CreateBackup_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_CreateBackup] +// [END spanner_v1_generated_DatabaseAdmin_CreateBackup_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateDatabase/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateDatabase/main.go index bcc19987d32..7699dfcbab5 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateDatabase/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/CreateDatabase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_CreateDatabase] +// [START spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_CreateDatabase] +// [END spanner_v1_generated_DatabaseAdmin_CreateDatabase_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DeleteBackup/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DeleteBackup/main.go index d533548c987..9ea3501a3b8 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DeleteBackup/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DeleteBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_DeleteBackup] +// [START spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_DeleteBackup] +// [END spanner_v1_generated_DatabaseAdmin_DeleteBackup_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DropDatabase/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DropDatabase/main.go index 13156577747..26ac8f20acd 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DropDatabase/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/DropDatabase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_DropDatabase] +// [START spanner_v1_generated_DatabaseAdmin_DropDatabase_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_DropDatabase] +// [END spanner_v1_generated_DatabaseAdmin_DropDatabase_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetBackup/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetBackup/main.go index 240f369014e..399534012cb 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetBackup/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetBackup] +// [START spanner_v1_generated_DatabaseAdmin_GetBackup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetBackup] +// [END spanner_v1_generated_DatabaseAdmin_GetBackup_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabase/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabase/main.go index aea0eb2abac..615408cf459 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabase/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetDatabase] +// [START spanner_v1_generated_DatabaseAdmin_GetDatabase_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetDatabase] +// [END spanner_v1_generated_DatabaseAdmin_GetDatabase_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabaseDdl/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabaseDdl/main.go index 7eaeaa27ee3..b7499d2a1c8 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabaseDdl/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetDatabaseDdl/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetDatabaseDdl] +// [START spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetDatabaseDdl] +// [END spanner_v1_generated_DatabaseAdmin_GetDatabaseDdl_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetIamPolicy/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetIamPolicy/main.go index 0aad7a3e4f6..07e74cda126 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetIamPolicy] +// [START spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_GetIamPolicy] +// [END spanner_v1_generated_DatabaseAdmin_GetIamPolicy_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackupOperations/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackupOperations/main.go index f371083aa83..3bd418ecab8 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackupOperations/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackupOperations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListBackupOperations] +// [START spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListBackupOperations] +// [END spanner_v1_generated_DatabaseAdmin_ListBackupOperations_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackups/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackups/main.go index 479b56ccba1..8d46c893af4 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackups/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListBackups/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListBackups] +// [START spanner_v1_generated_DatabaseAdmin_ListBackups_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListBackups] +// [END spanner_v1_generated_DatabaseAdmin_ListBackups_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabaseOperations/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabaseOperations/main.go index a2433ec6d17..f0c25c7c4b2 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabaseOperations/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabaseOperations/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListDatabaseOperations] +// [START spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListDatabaseOperations] +// [END spanner_v1_generated_DatabaseAdmin_ListDatabaseOperations_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabases/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabases/main.go index d28bd2daefa..e72939706cc 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabases/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/ListDatabases/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListDatabases] +// [START spanner_v1_generated_DatabaseAdmin_ListDatabases_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_ListDatabases] +// [END spanner_v1_generated_DatabaseAdmin_ListDatabases_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/NewDatabaseAdminClient/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/NewDatabaseAdminClient/main.go deleted file mode 100644 index 28a896001f5..00000000000 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/NewDatabaseAdminClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_admin_database_apiv1_NewDatabaseAdminClient] - -package main - -import ( - "context" - - database "cloud.google.com/go/spanner/admin/database/apiv1" -) - -func main() { - ctx := context.Background() - c, err := database.NewDatabaseAdminClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END spanner_generated_spanner_admin_database_apiv1_NewDatabaseAdminClient] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/RestoreDatabase/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/RestoreDatabase/main.go index b2b0723ddf7..eb82e9559bb 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/RestoreDatabase/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/RestoreDatabase/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_RestoreDatabase] +// [START spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_RestoreDatabase] +// [END spanner_v1_generated_DatabaseAdmin_RestoreDatabase_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/SetIamPolicy/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/SetIamPolicy/main.go index 074c83ae2f1..6eca90c8985 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_SetIamPolicy] +// [START spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_SetIamPolicy] +// [END spanner_v1_generated_DatabaseAdmin_SetIamPolicy_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/TestIamPermissions/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/TestIamPermissions/main.go index 9ada7156f25..6e67cf27a46 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_TestIamPermissions] +// [START spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_TestIamPermissions] +// [END spanner_v1_generated_DatabaseAdmin_TestIamPermissions_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateBackup/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateBackup/main.go index 95c6a505dc1..ccc3a916f59 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateBackup/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateBackup/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_UpdateBackup] +// [START spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_UpdateBackup] +// [END spanner_v1_generated_DatabaseAdmin_UpdateBackup_sync] diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateDatabaseDdl/main.go b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateDatabaseDdl/main.go index f456cf27ed3..e2114705f1f 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateDatabaseDdl/main.go +++ b/internal/generated/snippets/spanner/admin/database/apiv1/DatabaseAdminClient/UpdateDatabaseDdl/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_UpdateDatabaseDdl] +// [START spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_database_apiv1_DatabaseAdminClient_UpdateDatabaseDdl] +// [END spanner_v1_generated_DatabaseAdmin_UpdateDatabaseDdl_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/CreateInstance/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/CreateInstance/main.go index 8e0329f9e73..eadfca8642a 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/CreateInstance/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/CreateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_CreateInstance] +// [START spanner_v1_generated_InstanceAdmin_CreateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_CreateInstance] +// [END spanner_v1_generated_InstanceAdmin_CreateInstance_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/DeleteInstance/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/DeleteInstance/main.go index 9fd77ee44d5..fd3511c8595 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/DeleteInstance/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/DeleteInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_DeleteInstance] +// [START spanner_v1_generated_InstanceAdmin_DeleteInstance_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_DeleteInstance] +// [END spanner_v1_generated_InstanceAdmin_DeleteInstance_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetIamPolicy/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetIamPolicy/main.go index f79bb6b0e5c..54953195769 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetIamPolicy/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_GetIamPolicy] +// [START spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_GetIamPolicy] +// [END spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstance/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstance/main.go index 9d68be3a424..14db5ff0466 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstance/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_GetInstance] +// [START spanner_v1_generated_InstanceAdmin_GetInstance_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_GetInstance] +// [END spanner_v1_generated_InstanceAdmin_GetInstance_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstanceConfig/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstanceConfig/main.go index e0e238d34d4..236b561f02b 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstanceConfig/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/GetInstanceConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_GetInstanceConfig] +// [START spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_GetInstanceConfig] +// [END spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstanceConfigs/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstanceConfigs/main.go index 626e187c202..e94db5e8ccb 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstanceConfigs/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstanceConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_ListInstanceConfigs] +// [START spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_ListInstanceConfigs] +// [END spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstances/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstances/main.go index c4c875888c9..d0a6e1b2305 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstances/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/ListInstances/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_ListInstances] +// [START spanner_v1_generated_InstanceAdmin_ListInstances_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_ListInstances] +// [END spanner_v1_generated_InstanceAdmin_ListInstances_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/NewInstanceAdminClient/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/NewInstanceAdminClient/main.go deleted file mode 100644 index 1b8b77c97d2..00000000000 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/NewInstanceAdminClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_admin_instance_apiv1_NewInstanceAdminClient] - -package main - -import ( - "context" - - instance "cloud.google.com/go/spanner/admin/instance/apiv1" -) - -func main() { - ctx := context.Background() - c, err := instance.NewInstanceAdminClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END spanner_generated_spanner_admin_instance_apiv1_NewInstanceAdminClient] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/SetIamPolicy/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/SetIamPolicy/main.go index a78bdb7696a..f8ff8d042c4 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/SetIamPolicy/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/SetIamPolicy/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_SetIamPolicy] +// [START spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_SetIamPolicy] +// [END spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/TestIamPermissions/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/TestIamPermissions/main.go index 64426a846d6..783578594c8 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/TestIamPermissions/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/TestIamPermissions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_TestIamPermissions] +// [START spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_TestIamPermissions] +// [END spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync] diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/UpdateInstance/main.go b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/UpdateInstance/main.go index b327aca1690..7590201311e 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/UpdateInstance/main.go +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/InstanceAdminClient/UpdateInstance/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_UpdateInstance] +// [START spanner_v1_generated_InstanceAdmin_UpdateInstance_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_admin_instance_apiv1_InstanceAdminClient_UpdateInstance] +// [END spanner_v1_generated_InstanceAdmin_UpdateInstance_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/BatchCreateSessions/main.go b/internal/generated/snippets/spanner/apiv1/Client/BatchCreateSessions/main.go index 1bb031e0fa5..a74d9891a8b 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/BatchCreateSessions/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/BatchCreateSessions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_BatchCreateSessions] +// [START spanner_v1_generated_Spanner_BatchCreateSessions_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_BatchCreateSessions] +// [END spanner_v1_generated_Spanner_BatchCreateSessions_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/BeginTransaction/main.go b/internal/generated/snippets/spanner/apiv1/Client/BeginTransaction/main.go index b8abccfe5db..ea1cc245330 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/BeginTransaction/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/BeginTransaction/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_BeginTransaction] +// [START spanner_v1_generated_Spanner_BeginTransaction_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_BeginTransaction] +// [END spanner_v1_generated_Spanner_BeginTransaction_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/Commit/main.go b/internal/generated/snippets/spanner/apiv1/Client/Commit/main.go index 765e7316914..955d9d7e925 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/Commit/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/Commit/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_Commit] +// [START spanner_v1_generated_Spanner_Commit_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_Commit] +// [END spanner_v1_generated_Spanner_Commit_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/CreateSession/main.go b/internal/generated/snippets/spanner/apiv1/Client/CreateSession/main.go index a9ab224dbda..45239791d68 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/CreateSession/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/CreateSession/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_CreateSession] +// [START spanner_v1_generated_Spanner_CreateSession_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_CreateSession] +// [END spanner_v1_generated_Spanner_CreateSession_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/DeleteSession/main.go b/internal/generated/snippets/spanner/apiv1/Client/DeleteSession/main.go index ca0e18b1059..7f976a374ac 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/DeleteSession/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/DeleteSession/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_DeleteSession] +// [START spanner_v1_generated_Spanner_DeleteSession_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END spanner_generated_spanner_apiv1_Client_DeleteSession] +// [END spanner_v1_generated_Spanner_DeleteSession_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/ExecuteBatchDml/main.go b/internal/generated/snippets/spanner/apiv1/Client/ExecuteBatchDml/main.go index cfc409efcb6..d37adc7dce5 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/ExecuteBatchDml/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/ExecuteBatchDml/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_ExecuteBatchDml] +// [START spanner_v1_generated_Spanner_ExecuteBatchDml_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_ExecuteBatchDml] +// [END spanner_v1_generated_Spanner_ExecuteBatchDml_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/ExecuteSql/main.go b/internal/generated/snippets/spanner/apiv1/Client/ExecuteSql/main.go index 508d1724b21..b1b5933669d 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/ExecuteSql/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/ExecuteSql/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_ExecuteSql] +// [START spanner_v1_generated_Spanner_ExecuteSql_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_ExecuteSql] +// [END spanner_v1_generated_Spanner_ExecuteSql_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/GetSession/main.go b/internal/generated/snippets/spanner/apiv1/Client/GetSession/main.go index 69f006eedab..7c7b78208c5 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/GetSession/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/GetSession/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_GetSession] +// [START spanner_v1_generated_Spanner_GetSession_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_GetSession] +// [END spanner_v1_generated_Spanner_GetSession_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/ListSessions/main.go b/internal/generated/snippets/spanner/apiv1/Client/ListSessions/main.go index c035570a73d..5b12a1c4bbf 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/ListSessions/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/ListSessions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_ListSessions] +// [START spanner_v1_generated_Spanner_ListSessions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END spanner_generated_spanner_apiv1_Client_ListSessions] +// [END spanner_v1_generated_Spanner_ListSessions_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/NewClient/main.go b/internal/generated/snippets/spanner/apiv1/Client/NewClient/main.go deleted file mode 100644 index b2628c51ce2..00000000000 --- a/internal/generated/snippets/spanner/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START spanner_generated_spanner_apiv1_NewClient] - -package main - -import ( - "context" - - spanner "cloud.google.com/go/spanner/apiv1" -) - -func main() { - ctx := context.Background() - c, err := spanner.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END spanner_generated_spanner_apiv1_NewClient] diff --git a/internal/generated/snippets/spanner/apiv1/Client/PartitionQuery/main.go b/internal/generated/snippets/spanner/apiv1/Client/PartitionQuery/main.go index 38baaef3ece..8420fc8f890 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/PartitionQuery/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/PartitionQuery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_PartitionQuery] +// [START spanner_v1_generated_Spanner_PartitionQuery_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_PartitionQuery] +// [END spanner_v1_generated_Spanner_PartitionQuery_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/PartitionRead/main.go b/internal/generated/snippets/spanner/apiv1/Client/PartitionRead/main.go index 9ef11aac542..2313a06e68c 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/PartitionRead/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/PartitionRead/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_PartitionRead] +// [START spanner_v1_generated_Spanner_PartitionRead_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_PartitionRead] +// [END spanner_v1_generated_Spanner_PartitionRead_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/Read/main.go b/internal/generated/snippets/spanner/apiv1/Client/Read/main.go index 1007aae411c..eed3406bf71 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/Read/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/Read/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_Read] +// [START spanner_v1_generated_Spanner_Read_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END spanner_generated_spanner_apiv1_Client_Read] +// [END spanner_v1_generated_Spanner_Read_sync] diff --git a/internal/generated/snippets/spanner/apiv1/Client/Rollback/main.go b/internal/generated/snippets/spanner/apiv1/Client/Rollback/main.go index 474082f09fb..056e02ae501 100644 --- a/internal/generated/snippets/spanner/apiv1/Client/Rollback/main.go +++ b/internal/generated/snippets/spanner/apiv1/Client/Rollback/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START spanner_generated_spanner_apiv1_Client_Rollback] +// [START spanner_v1_generated_Spanner_Rollback_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END spanner_generated_spanner_apiv1_Client_Rollback] +// [END spanner_v1_generated_Spanner_Rollback_sync] diff --git a/internal/generated/snippets/speech/apiv1/Client/LongRunningRecognize/main.go b/internal/generated/snippets/speech/apiv1/Client/LongRunningRecognize/main.go index 0d16bb77dc6..069a1bbcfc7 100644 --- a/internal/generated/snippets/speech/apiv1/Client/LongRunningRecognize/main.go +++ b/internal/generated/snippets/speech/apiv1/Client/LongRunningRecognize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1_Client_LongRunningRecognize] +// [START speech_v1_generated_Speech_LongRunningRecognize_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1_Client_LongRunningRecognize] +// [END speech_v1_generated_Speech_LongRunningRecognize_sync] diff --git a/internal/generated/snippets/speech/apiv1/Client/NewClient/main.go b/internal/generated/snippets/speech/apiv1/Client/NewClient/main.go deleted file mode 100644 index e932925b7c4..00000000000 --- a/internal/generated/snippets/speech/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START speech_generated_speech_apiv1_NewClient] - -package main - -import ( - "context" - - speech "cloud.google.com/go/speech/apiv1" -) - -func main() { - ctx := context.Background() - c, err := speech.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END speech_generated_speech_apiv1_NewClient] diff --git a/internal/generated/snippets/speech/apiv1/Client/Recognize/main.go b/internal/generated/snippets/speech/apiv1/Client/Recognize/main.go index e10990f73e6..3c5cf2ace66 100644 --- a/internal/generated/snippets/speech/apiv1/Client/Recognize/main.go +++ b/internal/generated/snippets/speech/apiv1/Client/Recognize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1_Client_Recognize] +// [START speech_v1_generated_Speech_Recognize_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1_Client_Recognize] +// [END speech_v1_generated_Speech_Recognize_sync] diff --git a/internal/generated/snippets/speech/apiv1/Client/StreamingRecognize/main.go b/internal/generated/snippets/speech/apiv1/Client/StreamingRecognize/main.go index a30802accb2..ef84df41d7a 100644 --- a/internal/generated/snippets/speech/apiv1/Client/StreamingRecognize/main.go +++ b/internal/generated/snippets/speech/apiv1/Client/StreamingRecognize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1_Client_StreamingRecognize] +// [START speech_v1_generated_Speech_StreamingRecognize_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END speech_generated_speech_apiv1_Client_StreamingRecognize] +// [END speech_v1_generated_Speech_StreamingRecognize_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreateCustomClass/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreateCustomClass/main.go index 5decdbcae24..4f7f48ba1b4 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreateCustomClass/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreateCustomClass/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_CreateCustomClass] +// [START speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_CreateCustomClass] +// [END speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreatePhraseSet/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreatePhraseSet/main.go index f4b038a82fa..1867d814ad1 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreatePhraseSet/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/CreatePhraseSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_CreatePhraseSet] +// [START speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_CreatePhraseSet] +// [END speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeleteCustomClass/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeleteCustomClass/main.go index 1d3cfb3e681..52930e6141a 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeleteCustomClass/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeleteCustomClass/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_DeleteCustomClass] +// [START speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_DeleteCustomClass] +// [END speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeletePhraseSet/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeletePhraseSet/main.go index 8716bc66a4b..8f92a7783bb 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeletePhraseSet/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/DeletePhraseSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_DeletePhraseSet] +// [START speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_DeletePhraseSet] +// [END speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetCustomClass/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetCustomClass/main.go index a2b283268e9..04a9945f4f6 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetCustomClass/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetCustomClass/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_GetCustomClass] +// [START speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_GetCustomClass] +// [END speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetPhraseSet/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetPhraseSet/main.go index 5374da34d87..b6ccafd84ab 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetPhraseSet/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/GetPhraseSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_GetPhraseSet] +// [START speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_GetPhraseSet] +// [END speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListCustomClasses/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListCustomClasses/main.go index 9914f8393dd..ba05d5a5650 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListCustomClasses/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListCustomClasses/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_ListCustomClasses] +// [START speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_ListCustomClasses] +// [END speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListPhraseSet/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListPhraseSet/main.go index d8f18a0c4ac..90c49a34124 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListPhraseSet/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/ListPhraseSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_ListPhraseSet] +// [START speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_ListPhraseSet] +// [END speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/NewAdaptationClient/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/NewAdaptationClient/main.go deleted file mode 100644 index e9a4ec29b8f..00000000000 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/NewAdaptationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START speech_generated_speech_apiv1p1beta1_NewAdaptationClient] - -package main - -import ( - "context" - - speech "cloud.google.com/go/speech/apiv1p1beta1" -) - -func main() { - ctx := context.Background() - c, err := speech.NewAdaptationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END speech_generated_speech_apiv1p1beta1_NewAdaptationClient] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdateCustomClass/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdateCustomClass/main.go index 356f845a24d..87886370678 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdateCustomClass/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdateCustomClass/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_UpdateCustomClass] +// [START speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_UpdateCustomClass] +// [END speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdatePhraseSet/main.go b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdatePhraseSet/main.go index 3e22c1f15dd..4f007807d09 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdatePhraseSet/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/AdaptationClient/UpdatePhraseSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_AdaptationClient_UpdatePhraseSet] +// [START speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_AdaptationClient_UpdatePhraseSet] +// [END speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/Client/LongRunningRecognize/main.go b/internal/generated/snippets/speech/apiv1p1beta1/Client/LongRunningRecognize/main.go index f68cdd332d2..18faf17dfb6 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/Client/LongRunningRecognize/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/Client/LongRunningRecognize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_Client_LongRunningRecognize] +// [START speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_Client_LongRunningRecognize] +// [END speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/Client/NewClient/main.go b/internal/generated/snippets/speech/apiv1p1beta1/Client/NewClient/main.go deleted file mode 100644 index ea1860ad8d0..00000000000 --- a/internal/generated/snippets/speech/apiv1p1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START speech_generated_speech_apiv1p1beta1_NewClient] - -package main - -import ( - "context" - - speech "cloud.google.com/go/speech/apiv1p1beta1" -) - -func main() { - ctx := context.Background() - c, err := speech.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END speech_generated_speech_apiv1p1beta1_NewClient] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/Client/Recognize/main.go b/internal/generated/snippets/speech/apiv1p1beta1/Client/Recognize/main.go index db4f672a331..a9dea599515 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/Client/Recognize/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/Client/Recognize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_Client_Recognize] +// [START speech_v1p1beta1_generated_Speech_Recognize_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END speech_generated_speech_apiv1p1beta1_Client_Recognize] +// [END speech_v1p1beta1_generated_Speech_Recognize_sync] diff --git a/internal/generated/snippets/speech/apiv1p1beta1/Client/StreamingRecognize/main.go b/internal/generated/snippets/speech/apiv1p1beta1/Client/StreamingRecognize/main.go index 5eb3d907f0f..e6326aa1904 100644 --- a/internal/generated/snippets/speech/apiv1p1beta1/Client/StreamingRecognize/main.go +++ b/internal/generated/snippets/speech/apiv1p1beta1/Client/StreamingRecognize/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START speech_generated_speech_apiv1p1beta1_Client_StreamingRecognize] +// [START speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] package main @@ -60,4 +60,4 @@ func main() { } } -// [END speech_generated_speech_apiv1p1beta1_Client_StreamingRecognize] +// [END speech_v1p1beta1_generated_Speech_StreamingRecognize_sync] diff --git a/internal/generated/snippets/storage/ACLHandle/Delete/main.go b/internal/generated/snippets/storage/ACLHandle/Delete/main.go deleted file mode 100644 index adce25291ed..00000000000 --- a/internal/generated/snippets/storage/ACLHandle/Delete/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ACLHandle_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // No longer grant access to the bucket to everyone on the Internet. - if err := client.Bucket("my-bucket").ACL().Delete(ctx, storage.AllUsers); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_ACLHandle_Delete] diff --git a/internal/generated/snippets/storage/ACLHandle/List/main.go b/internal/generated/snippets/storage/ACLHandle/List/main.go deleted file mode 100644 index 2b13fc5f2f7..00000000000 --- a/internal/generated/snippets/storage/ACLHandle/List/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ACLHandle_List] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // List the default object ACLs for my-bucket. - aclRules, err := client.Bucket("my-bucket").DefaultObjectACL().List(ctx) - if err != nil { - // TODO: handle error. - } - fmt.Println(aclRules) -} - -// [END storage_generated_storage_ACLHandle_List] diff --git a/internal/generated/snippets/storage/ACLHandle/Set/main.go b/internal/generated/snippets/storage/ACLHandle/Set/main.go deleted file mode 100644 index 6a814d58d6f..00000000000 --- a/internal/generated/snippets/storage/ACLHandle/Set/main.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ACLHandle_Set] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Let any authenticated user read my-bucket/my-object. - obj := client.Bucket("my-bucket").Object("my-object") - if err := obj.ACL().Set(ctx, storage.AllAuthenticatedUsers, storage.RoleReader); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_ACLHandle_Set] diff --git a/internal/generated/snippets/storage/BucketHandle/AddNotification/main.go b/internal/generated/snippets/storage/BucketHandle/AddNotification/main.go deleted file mode 100644 index deb8f919d28..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/AddNotification/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_AddNotification] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - b := client.Bucket("my-bucket") - n, err := b.AddNotification(ctx, &storage.Notification{ - TopicProjectID: "my-project", - TopicID: "my-topic", - PayloadFormat: storage.JSONPayload, - }) - if err != nil { - // TODO: handle error. - } - fmt.Println(n.ID) -} - -// [END storage_generated_storage_BucketHandle_AddNotification] diff --git a/internal/generated/snippets/storage/BucketHandle/Attrs/main.go b/internal/generated/snippets/storage/BucketHandle/Attrs/main.go deleted file mode 100644 index 5b33060d0ce..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Attrs/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Attrs] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - attrs, err := client.Bucket("my-bucket").Attrs(ctx) - if err != nil { - // TODO: handle error. - } - fmt.Println(attrs) -} - -// [END storage_generated_storage_BucketHandle_Attrs] diff --git a/internal/generated/snippets/storage/BucketHandle/Create/main.go b/internal/generated/snippets/storage/BucketHandle/Create/main.go deleted file mode 100644 index 1c12313a0b3..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Create/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Create] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - if err := client.Bucket("my-bucket").Create(ctx, "my-project", nil); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_BucketHandle_Create] diff --git a/internal/generated/snippets/storage/BucketHandle/Delete/main.go b/internal/generated/snippets/storage/BucketHandle/Delete/main.go deleted file mode 100644 index b87659de5a6..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Delete/main.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - if err := client.Bucket("my-bucket").Delete(ctx); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_BucketHandle_Delete] diff --git a/internal/generated/snippets/storage/BucketHandle/DeleteNotification/main.go b/internal/generated/snippets/storage/BucketHandle/DeleteNotification/main.go deleted file mode 100644 index 0a969866287..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/DeleteNotification/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_DeleteNotification] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -var notificationID string - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - b := client.Bucket("my-bucket") - // TODO: Obtain notificationID from BucketHandle.AddNotification - // or BucketHandle.Notifications. - err = b.DeleteNotification(ctx, notificationID) - if err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_BucketHandle_DeleteNotification] diff --git a/internal/generated/snippets/storage/BucketHandle/LockRetentionPolicy/main.go b/internal/generated/snippets/storage/BucketHandle/LockRetentionPolicy/main.go deleted file mode 100644 index bfe0caf5f19..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/LockRetentionPolicy/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_LockRetentionPolicy] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - b := client.Bucket("my-bucket") - attrs, err := b.Attrs(ctx) - if err != nil { - // TODO: handle error. - } - // Note that locking the bucket without first attaching a RetentionPolicy - // that's at least 1 day is a no-op - err = b.If(storage.BucketConditions{MetagenerationMatch: attrs.MetaGeneration}).LockRetentionPolicy(ctx) - if err != nil { - // TODO: handle err - } -} - -// [END storage_generated_storage_BucketHandle_LockRetentionPolicy] diff --git a/internal/generated/snippets/storage/BucketHandle/Notifications/main.go b/internal/generated/snippets/storage/BucketHandle/Notifications/main.go deleted file mode 100644 index 62b7bee7622..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Notifications/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Notifications] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - b := client.Bucket("my-bucket") - ns, err := b.Notifications(ctx) - if err != nil { - // TODO: handle error. - } - for id, n := range ns { - fmt.Printf("%s: %+v\n", id, n) - } -} - -// [END storage_generated_storage_BucketHandle_Notifications] diff --git a/internal/generated/snippets/storage/BucketHandle/Objects/main.go b/internal/generated/snippets/storage/BucketHandle/Objects/main.go deleted file mode 100644 index 0fe1afc1aab..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Objects/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Objects] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - it := client.Bucket("my-bucket").Objects(ctx, nil) - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END storage_generated_storage_BucketHandle_Objects] diff --git a/internal/generated/snippets/storage/BucketHandle/Update/main.go b/internal/generated/snippets/storage/BucketHandle/Update/main.go deleted file mode 100644 index c92c9f736de..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Update/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Update] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Enable versioning in the bucket, regardless of its previous value. - attrs, err := client.Bucket("my-bucket").Update(ctx, - storage.BucketAttrsToUpdate{VersioningEnabled: true}) - if err != nil { - // TODO: handle error. - } - fmt.Println(attrs) -} - -// [END storage_generated_storage_BucketHandle_Update] diff --git a/internal/generated/snippets/storage/BucketHandle/Update/readModifyWrite/main.go b/internal/generated/snippets/storage/BucketHandle/Update/readModifyWrite/main.go deleted file mode 100644 index e87d8f8f836..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/Update/readModifyWrite/main.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_Update_readModifyWrite] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - b := client.Bucket("my-bucket") - attrs, err := b.Attrs(ctx) - if err != nil { - // TODO: handle error. - } - var au storage.BucketAttrsToUpdate - au.SetLabel("lab", attrs.Labels["lab"]+"-more") - if attrs.Labels["delete-me"] == "yes" { - au.DeleteLabel("delete-me") - } - attrs, err = b. - If(storage.BucketConditions{MetagenerationMatch: attrs.MetaGeneration}). - Update(ctx, au) - if err != nil { - // TODO: handle error. - } - fmt.Println(attrs) -} - -// [END storage_generated_storage_BucketHandle_Update_readModifyWrite] diff --git a/internal/generated/snippets/storage/BucketHandle/main.go b/internal/generated/snippets/storage/BucketHandle/main.go deleted file mode 100644 index 3c5b94cf107..00000000000 --- a/internal/generated/snippets/storage/BucketHandle/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketHandle_exists] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - attrs, err := client.Bucket("my-bucket").Attrs(ctx) - if err == storage.ErrBucketNotExist { - fmt.Println("The bucket does not exist") - return - } - if err != nil { - // TODO: handle error. - } - fmt.Printf("The bucket exists and has attributes: %#v\n", attrs) -} - -// [END storage_generated_storage_BucketHandle_exists] diff --git a/internal/generated/snippets/storage/BucketIterator/Next/main.go b/internal/generated/snippets/storage/BucketIterator/Next/main.go deleted file mode 100644 index 8d5988535dd..00000000000 --- a/internal/generated/snippets/storage/BucketIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_BucketIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - it := client.Buckets(ctx, "my-project") - for { - bucketAttrs, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(bucketAttrs) - } -} - -// [END storage_generated_storage_BucketIterator_Next] diff --git a/internal/generated/snippets/storage/Client/Buckets/main.go b/internal/generated/snippets/storage/Client/Buckets/main.go deleted file mode 100644 index b66508c213a..00000000000 --- a/internal/generated/snippets/storage/Client/Buckets/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Client_Buckets] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - it := client.Buckets(ctx, "my-bucket") - _ = it // TODO: iterate using Next or iterator.Pager. -} - -// [END storage_generated_storage_Client_Buckets] diff --git a/internal/generated/snippets/storage/Client/CreateHMACKey/main.go b/internal/generated/snippets/storage/Client/CreateHMACKey/main.go deleted file mode 100644 index beef237f63b..00000000000 --- a/internal/generated/snippets/storage/Client/CreateHMACKey/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Client_CreateHMACKey] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - hkey, err := client.CreateHMACKey(ctx, "project-id", "service-account-email") - if err != nil { - // TODO: handle error. - } - _ = hkey // TODO: Use the HMAC Key. -} - -// [END storage_generated_storage_Client_CreateHMACKey] diff --git a/internal/generated/snippets/storage/Client/ListHMACKeys/forServiceAccountEmail/main.go b/internal/generated/snippets/storage/Client/ListHMACKeys/forServiceAccountEmail/main.go deleted file mode 100644 index af645083224..00000000000 --- a/internal/generated/snippets/storage/Client/ListHMACKeys/forServiceAccountEmail/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Client_ListHMACKeys_forServiceAccountEmail] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - iter := client.ListHMACKeys(ctx, "project-id", storage.ForHMACKeyServiceAccountEmail("service@account.email")) - for { - key, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: handle error. - } - _ = key // TODO: Use the key. - } -} - -// [END storage_generated_storage_Client_ListHMACKeys_forServiceAccountEmail] diff --git a/internal/generated/snippets/storage/Client/ListHMACKeys/main.go b/internal/generated/snippets/storage/Client/ListHMACKeys/main.go deleted file mode 100644 index d69c008d8a8..00000000000 --- a/internal/generated/snippets/storage/Client/ListHMACKeys/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Client_ListHMACKeys] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - iter := client.ListHMACKeys(ctx, "project-id") - for { - key, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: handle error. - } - _ = key // TODO: Use the key. - } -} - -// [END storage_generated_storage_Client_ListHMACKeys] diff --git a/internal/generated/snippets/storage/Client/ListHMACKeys/showDeletedKeys/main.go b/internal/generated/snippets/storage/Client/ListHMACKeys/showDeletedKeys/main.go deleted file mode 100644 index 18dbb3a8024..00000000000 --- a/internal/generated/snippets/storage/Client/ListHMACKeys/showDeletedKeys/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Client_ListHMACKeys_showDeletedKeys] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - iter := client.ListHMACKeys(ctx, "project-id", storage.ShowDeletedHMACKeys()) - for { - key, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: handle error. - } - _ = key // TODO: Use the key. - } -} - -// [END storage_generated_storage_Client_ListHMACKeys_showDeletedKeys] diff --git a/internal/generated/snippets/storage/Client/NewClient/main.go b/internal/generated/snippets/storage/Client/NewClient/main.go deleted file mode 100644 index 7a83fbc076a..00000000000 --- a/internal/generated/snippets/storage/Client/NewClient/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_NewClient] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - // Use Google Application Default Credentials to authorize and authenticate the client. - // More information about Application Default Credentials and how to enable is at - // https://developers.google.com/identity/protocols/application-default-credentials. - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Use the client. - - // Close the client when finished. - if err := client.Close(); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_NewClient] diff --git a/internal/generated/snippets/storage/Client/NewClient/unauthenticated/main.go b/internal/generated/snippets/storage/Client/NewClient/unauthenticated/main.go deleted file mode 100644 index 34b6aaeb38e..00000000000 --- a/internal/generated/snippets/storage/Client/NewClient/unauthenticated/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_NewClient_unauthenticated] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" - "google.golang.org/api/option" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx, option.WithoutAuthentication()) - if err != nil { - // TODO: handle error. - } - // Use the client. - - // Close the client when finished. - if err := client.Close(); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_NewClient_unauthenticated] diff --git a/internal/generated/snippets/storage/Composer/Run/main.go b/internal/generated/snippets/storage/Composer/Run/main.go deleted file mode 100644 index fe0f9d18525..00000000000 --- a/internal/generated/snippets/storage/Composer/Run/main.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Composer_Run] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - bkt := client.Bucket("bucketname") - src1 := bkt.Object("o1") - src2 := bkt.Object("o2") - dst := bkt.Object("o3") - - // Compose and modify metadata. - c := dst.ComposerFrom(src1, src2) - c.ContentType = "text/plain" - - // Set the expected checksum for the destination object to be validated by - // the backend (if desired). - c.CRC32C = 42 - c.SendCRC32C = true - - attrs, err := c.Run(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Println(attrs) - // Just compose. - attrs, err = dst.ComposerFrom(src1, src2).Run(ctx) - if err != nil { - // TODO: Handle error. - } - fmt.Println(attrs) -} - -// [END storage_generated_storage_Composer_Run] diff --git a/internal/generated/snippets/storage/Copier/Run/main.go b/internal/generated/snippets/storage/Copier/Run/main.go deleted file mode 100644 index 943e0ecd723..00000000000 --- a/internal/generated/snippets/storage/Copier/Run/main.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Copier_Run] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - src := client.Bucket("bucketname").Object("file1") - dst := client.Bucket("another-bucketname").Object("file2") - - // Copy content and modify metadata. - copier := dst.CopierFrom(src) - copier.ContentType = "text/plain" - attrs, err := copier.Run(ctx) - if err != nil { - // TODO: Handle error, possibly resuming with copier.RewriteToken. - } - fmt.Println(attrs) - - // Just copy content. - attrs, err = dst.CopierFrom(src).Run(ctx) - if err != nil { - // TODO: Handle error. No way to resume. - } - fmt.Println(attrs) -} - -// [END storage_generated_storage_Copier_Run] diff --git a/internal/generated/snippets/storage/Copier/Run/progress/main.go b/internal/generated/snippets/storage/Copier/Run/progress/main.go deleted file mode 100644 index d0a16e04d7f..00000000000 --- a/internal/generated/snippets/storage/Copier/Run/progress/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Copier_Run_progress] - -package main - -import ( - "context" - "log" - - "cloud.google.com/go/storage" -) - -func main() { - // Display progress across multiple rewrite RPCs. - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - src := client.Bucket("bucketname").Object("file1") - dst := client.Bucket("another-bucketname").Object("file2") - - copier := dst.CopierFrom(src) - copier.ProgressFunc = func(copiedBytes, totalBytes uint64) { - log.Printf("copy %.1f%% done", float64(copiedBytes)/float64(totalBytes)*100) - } - if _, err := copier.Run(ctx); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_Copier_Run_progress] diff --git a/internal/generated/snippets/storage/HMACKeyHandle/Delete/main.go b/internal/generated/snippets/storage/HMACKeyHandle/Delete/main.go deleted file mode 100644 index 12a4ceda7d1..00000000000 --- a/internal/generated/snippets/storage/HMACKeyHandle/Delete/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_HMACKeyHandle_Delete] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - hkh := client.HMACKeyHandle("project-id", "access-key-id") - // Make sure that the HMACKey being deleted has a status of inactive. - if err := hkh.Delete(ctx); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_HMACKeyHandle_Delete] diff --git a/internal/generated/snippets/storage/HMACKeyHandle/Get/main.go b/internal/generated/snippets/storage/HMACKeyHandle/Get/main.go deleted file mode 100644 index d2e5590c10b..00000000000 --- a/internal/generated/snippets/storage/HMACKeyHandle/Get/main.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_HMACKeyHandle_Get] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - hkh := client.HMACKeyHandle("project-id", "access-key-id") - hkey, err := hkh.Get(ctx) - if err != nil { - // TODO: handle error. - } - _ = hkey // TODO: Use the HMAC Key. -} - -// [END storage_generated_storage_HMACKeyHandle_Get] diff --git a/internal/generated/snippets/storage/HMACKeyHandle/Update/main.go b/internal/generated/snippets/storage/HMACKeyHandle/Update/main.go deleted file mode 100644 index e42fdca4540..00000000000 --- a/internal/generated/snippets/storage/HMACKeyHandle/Update/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_HMACKeyHandle_Update] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - hkh := client.HMACKeyHandle("project-id", "access-key-id") - ukey, err := hkh.Update(ctx, storage.HMACKeyAttrsToUpdate{ - State: storage.Inactive, - }) - if err != nil { - // TODO: handle error. - } - _ = ukey // TODO: Use the HMAC Key. -} - -// [END storage_generated_storage_HMACKeyHandle_Update] diff --git a/internal/generated/snippets/storage/ObjectHandle/Attrs/main.go b/internal/generated/snippets/storage/ObjectHandle/Attrs/main.go deleted file mode 100644 index 8114f2e5a8a..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/Attrs/main.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_Attrs] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - objAttrs, err := client.Bucket("my-bucket").Object("my-object").Attrs(ctx) - if err != nil { - // TODO: handle error. - } - fmt.Println(objAttrs) -} - -// [END storage_generated_storage_ObjectHandle_Attrs] diff --git a/internal/generated/snippets/storage/ObjectHandle/Attrs/withConditions/main.go b/internal/generated/snippets/storage/ObjectHandle/Attrs/withConditions/main.go deleted file mode 100644 index 9da5d68bc31..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/Attrs/withConditions/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_Attrs_withConditions] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - obj := client.Bucket("my-bucket").Object("my-object") - // Read the object. - objAttrs1, err := obj.Attrs(ctx) - if err != nil { - // TODO: handle error. - } - // Do something else for a while. - time.Sleep(5 * time.Minute) - // Now read the same contents, even if the object has been written since the last read. - objAttrs2, err := obj.Generation(objAttrs1.Generation).Attrs(ctx) - if err != nil { - // TODO: handle error. - } - fmt.Println(objAttrs1, objAttrs2) -} - -// [END storage_generated_storage_ObjectHandle_Attrs_withConditions] diff --git a/internal/generated/snippets/storage/ObjectHandle/CopierFrom/main.go b/internal/generated/snippets/storage/ObjectHandle/CopierFrom/main.go deleted file mode 100644 index 561486408ce..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/CopierFrom/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_CopierFrom_rotateEncryptionKeys] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -var key1, key2 []byte - -func main() { - // To rotate the encryption key on an object, copy it onto itself. - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - obj := client.Bucket("bucketname").Object("obj") - // Assume obj is encrypted with key1, and we want to change to key2. - _, err = obj.Key(key2).CopierFrom(obj.Key(key1)).Run(ctx) - if err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_ObjectHandle_CopierFrom_rotateEncryptionKeys] diff --git a/internal/generated/snippets/storage/ObjectHandle/Delete/main.go b/internal/generated/snippets/storage/ObjectHandle/Delete/main.go deleted file mode 100644 index b4b212f30f7..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/Delete/main.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_Delete] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // To delete multiple objects in a bucket, list them with an - // ObjectIterator, then Delete them. - - // If you are using this package on the App Engine Flex runtime, - // you can init a bucket client with your app's default bucket name. - // See http://godoc.org/google.golang.org/appengine/file#DefaultBucketName. - bucket := client.Bucket("my-bucket") - it := bucket.Objects(ctx, nil) - for { - objAttrs, err := it.Next() - if err != nil && err != iterator.Done { - // TODO: Handle error. - } - if err == iterator.Done { - break - } - if err := bucket.Object(objAttrs.Name).Delete(ctx); err != nil { - // TODO: Handle error. - } - } - fmt.Println("deleted all object items in the bucket specified.") -} - -// [END storage_generated_storage_ObjectHandle_Delete] diff --git a/internal/generated/snippets/storage/ObjectHandle/Generation/main.go b/internal/generated/snippets/storage/ObjectHandle/Generation/main.go deleted file mode 100644 index 9ac8a829b2b..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/Generation/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_Generation] - -package main - -import ( - "context" - "io" - "os" - - "cloud.google.com/go/storage" -) - -var gen int64 - -func main() { - // Read an object's contents from generation gen, regardless of the - // current generation of the object. - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - obj := client.Bucket("my-bucket").Object("my-object") - rc, err := obj.Generation(gen).NewReader(ctx) - if err != nil { - // TODO: handle error. - } - defer rc.Close() - if _, err := io.Copy(os.Stdout, rc); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_ObjectHandle_Generation] diff --git a/internal/generated/snippets/storage/ObjectHandle/If/main.go b/internal/generated/snippets/storage/ObjectHandle/If/main.go deleted file mode 100644 index 4969bad6526..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/If/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_If] - -package main - -import ( - "context" - "io" - "net/http" - "os" - - "cloud.google.com/go/storage" - "google.golang.org/api/googleapi" -) - -var gen int64 - -func main() { - // Read from an object only if the current generation is gen. - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - obj := client.Bucket("my-bucket").Object("my-object") - rc, err := obj.If(storage.Conditions{GenerationMatch: gen}).NewReader(ctx) - if err != nil { - // TODO: handle error. - } - - if _, err := io.Copy(os.Stdout, rc); err != nil { - // TODO: handle error. - } - if err := rc.Close(); err != nil { - switch ee := err.(type) { - case *googleapi.Error: - if ee.Code == http.StatusPreconditionFailed { - // The condition presented in the If failed. - // TODO: handle error. - } - - // TODO: handle other status codes here. - - default: - // TODO: handle error. - } - } -} - -// [END storage_generated_storage_ObjectHandle_If] diff --git a/internal/generated/snippets/storage/ObjectHandle/Key/main.go b/internal/generated/snippets/storage/ObjectHandle/Key/main.go deleted file mode 100644 index 9224ebf2fb1..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/Key/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_Key] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -var secretKey []byte - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - obj := client.Bucket("my-bucket").Object("my-object") - // Encrypt the object's contents. - w := obj.Key(secretKey).NewWriter(ctx) - if _, err := w.Write([]byte("top secret")); err != nil { - // TODO: handle error. - } - if err := w.Close(); err != nil { - // TODO: handle error. - } -} - -// [END storage_generated_storage_ObjectHandle_Key] diff --git a/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/lastNBytes/main.go b/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/lastNBytes/main.go deleted file mode 100644 index 477203bd8de..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/lastNBytes/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_NewRangeReader_lastNBytes] - -package main - -import ( - "context" - "fmt" - "io/ioutil" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Read only the last 10 bytes until the end of the file. - rc, err := client.Bucket("bucketname").Object("filename1").NewRangeReader(ctx, -10, -1) - if err != nil { - // TODO: handle error. - } - defer rc.Close() - - slurp, err := ioutil.ReadAll(rc) - if err != nil { - // TODO: handle error. - } - fmt.Printf("Last 10 bytes from the end of the file:\n%s\n", slurp) -} - -// [END storage_generated_storage_ObjectHandle_NewRangeReader_lastNBytes] diff --git a/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/main.go b/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/main.go deleted file mode 100644 index 2932609be01..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_NewRangeReader] - -package main - -import ( - "context" - "fmt" - "io/ioutil" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Read only the first 64K. - rc, err := client.Bucket("bucketname").Object("filename1").NewRangeReader(ctx, 0, 64*1024) - if err != nil { - // TODO: handle error. - } - defer rc.Close() - - slurp, err := ioutil.ReadAll(rc) - if err != nil { - // TODO: handle error. - } - fmt.Printf("first 64K of file contents:\n%s\n", slurp) -} - -// [END storage_generated_storage_ObjectHandle_NewRangeReader] diff --git a/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/untilEnd/main.go b/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/untilEnd/main.go deleted file mode 100644 index 7bafa396fec..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/NewRangeReader/untilEnd/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_NewRangeReader_untilEnd] - -package main - -import ( - "context" - "fmt" - "io/ioutil" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Read from the 101st byte until the end of the file. - rc, err := client.Bucket("bucketname").Object("filename1").NewRangeReader(ctx, 100, -1) - if err != nil { - // TODO: handle error. - } - defer rc.Close() - - slurp, err := ioutil.ReadAll(rc) - if err != nil { - // TODO: handle error. - } - fmt.Printf("From 101st byte until the end:\n%s\n", slurp) -} - -// [END storage_generated_storage_ObjectHandle_NewRangeReader_untilEnd] diff --git a/internal/generated/snippets/storage/ObjectHandle/NewReader/main.go b/internal/generated/snippets/storage/ObjectHandle/NewReader/main.go deleted file mode 100644 index 18ef4d95e52..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/NewReader/main.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_NewReader] - -package main - -import ( - "context" - "fmt" - "io/ioutil" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - rc, err := client.Bucket("my-bucket").Object("my-object").NewReader(ctx) - if err != nil { - // TODO: handle error. - } - slurp, err := ioutil.ReadAll(rc) - rc.Close() - if err != nil { - // TODO: handle error. - } - fmt.Println("file contents:", slurp) -} - -// [END storage_generated_storage_ObjectHandle_NewReader] diff --git a/internal/generated/snippets/storage/ObjectHandle/NewWriter/main.go b/internal/generated/snippets/storage/ObjectHandle/NewWriter/main.go deleted file mode 100644 index e373fc59426..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/NewWriter/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_NewWriter] - -package main - -import ( - "context" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - wc := client.Bucket("bucketname").Object("filename1").NewWriter(ctx) - _ = wc // TODO: Use the Writer. -} - -// [END storage_generated_storage_ObjectHandle_NewWriter] diff --git a/internal/generated/snippets/storage/ObjectHandle/Update/main.go b/internal/generated/snippets/storage/ObjectHandle/Update/main.go deleted file mode 100644 index e98ac03c9ea..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/Update/main.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_Update] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Change only the content type of the object. - objAttrs, err := client.Bucket("my-bucket").Object("my-object").Update(ctx, storage.ObjectAttrsToUpdate{ - ContentType: "text/html", - ContentDisposition: "", // delete ContentDisposition - }) - if err != nil { - // TODO: handle error. - } - fmt.Println(objAttrs) -} - -// [END storage_generated_storage_ObjectHandle_Update] diff --git a/internal/generated/snippets/storage/ObjectHandle/main.go b/internal/generated/snippets/storage/ObjectHandle/main.go deleted file mode 100644 index 31d55f01803..00000000000 --- a/internal/generated/snippets/storage/ObjectHandle/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectHandle_exists] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - - attrs, err := client.Bucket("my-bucket").Object("my-object").Attrs(ctx) - if err == storage.ErrObjectNotExist { - fmt.Println("The object does not exist") - return - } - if err != nil { - // TODO: handle error. - } - fmt.Printf("The object exists and has attributes: %#v\n", attrs) -} - -// [END storage_generated_storage_ObjectHandle_exists] diff --git a/internal/generated/snippets/storage/ObjectIterator/Next/main.go b/internal/generated/snippets/storage/ObjectIterator/Next/main.go deleted file mode 100644 index 9fdfc08951d..00000000000 --- a/internal/generated/snippets/storage/ObjectIterator/Next/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_ObjectIterator_Next] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - it := client.Bucket("my-bucket").Objects(ctx, nil) - for { - objAttrs, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - fmt.Println(objAttrs) - } -} - -// [END storage_generated_storage_ObjectIterator_Next] diff --git a/internal/generated/snippets/storage/PostPolicyV4/GenerateSignedPostPolicyV4/main.go b/internal/generated/snippets/storage/PostPolicyV4/GenerateSignedPostPolicyV4/main.go deleted file mode 100644 index 3f7133fb6f5..00000000000 --- a/internal/generated/snippets/storage/PostPolicyV4/GenerateSignedPostPolicyV4/main.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_GenerateSignedPostPolicyV4] - -package main - -import ( - "bytes" - "io" - "mime/multipart" - "net/http" - "time" - - "cloud.google.com/go/storage" -) - -func main() { - pv4, err := storage.GenerateSignedPostPolicyV4("my-bucket", "my-object.txt", &storage.PostPolicyV4Options{ - GoogleAccessID: "my-access-id", - PrivateKey: []byte("my-private-key"), - - // The upload expires in 2hours. - Expires: time.Now().Add(2 * time.Hour), - - Fields: &storage.PolicyV4Fields{ - StatusCodeOnSuccess: 200, - RedirectToURLOnSuccess: "https://example.org/", - // It MUST only be a text file. - ContentType: "text/plain", - }, - - // The conditions that the uploaded file will be expected to conform to. - Conditions: []storage.PostPolicyV4Condition{ - // Make the file a maximum of 10mB. - storage.ConditionContentLengthRange(0, 10<<20), - }, - }) - if err != nil { - // TODO: handle error. - } - - // Now you can upload your file using the generated post policy - // with a plain HTTP client or even the browser. - formBuf := new(bytes.Buffer) - mw := multipart.NewWriter(formBuf) - for fieldName, value := range pv4.Fields { - if err := mw.WriteField(fieldName, value); err != nil { - // TODO: handle error. - } - } - file := bytes.NewReader(bytes.Repeat([]byte("a"), 100)) - - mf, err := mw.CreateFormFile("file", "myfile.txt") - if err != nil { - // TODO: handle error. - } - if _, err := io.Copy(mf, file); err != nil { - // TODO: handle error. - } - if err := mw.Close(); err != nil { - // TODO: handle error. - } - - // Compose the request. - req, err := http.NewRequest("POST", pv4.URL, formBuf) - if err != nil { - // TODO: handle error. - } - // Ensure the Content-Type is derived from the multipart writer. - req.Header.Set("Content-Type", mw.FormDataContentType()) - res, err := http.DefaultClient.Do(req) - if err != nil { - // TODO: handle error. - } - _ = res -} - -// [END storage_generated_storage_GenerateSignedPostPolicyV4] diff --git a/internal/generated/snippets/storage/SignedURL/main.go b/internal/generated/snippets/storage/SignedURL/main.go deleted file mode 100644 index dbd79d5b49f..00000000000 --- a/internal/generated/snippets/storage/SignedURL/main.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_SignedURL] - -package main - -import ( - "fmt" - "io/ioutil" - "time" - - "cloud.google.com/go/storage" -) - -func main() { - pkey, err := ioutil.ReadFile("my-private-key.pem") - if err != nil { - // TODO: handle error. - } - url, err := storage.SignedURL("my-bucket", "my-object", &storage.SignedURLOptions{ - GoogleAccessID: "xxx@developer.gserviceaccount.com", - PrivateKey: pkey, - Method: "GET", - Expires: time.Now().Add(48 * time.Hour), - }) - if err != nil { - // TODO: handle error. - } - fmt.Println(url) -} - -// [END storage_generated_storage_SignedURL] diff --git a/internal/generated/snippets/storage/Writer/Write/checksum/main.go b/internal/generated/snippets/storage/Writer/Write/checksum/main.go deleted file mode 100644 index a7a4603e1af..00000000000 --- a/internal/generated/snippets/storage/Writer/Write/checksum/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Writer_Write_checksum] - -package main - -import ( - "context" - "fmt" - "hash/crc32" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - data := []byte("verify me") - wc := client.Bucket("bucketname").Object("filename1").NewWriter(ctx) - wc.CRC32C = crc32.Checksum(data, crc32.MakeTable(crc32.Castagnoli)) - wc.SendCRC32C = true - if _, err := wc.Write([]byte("hello world")); err != nil { - // TODO: handle error. - // Note that Write may return nil in some error situations, - // so always check the error from Close. - } - if err := wc.Close(); err != nil { - // TODO: handle error. - } - fmt.Println("updated object:", wc.Attrs()) -} - -// [END storage_generated_storage_Writer_Write_checksum] diff --git a/internal/generated/snippets/storage/Writer/Write/main.go b/internal/generated/snippets/storage/Writer/Write/main.go deleted file mode 100644 index 97a78dfe543..00000000000 --- a/internal/generated/snippets/storage/Writer/Write/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Writer_Write] - -package main - -import ( - "context" - "fmt" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - wc := client.Bucket("bucketname").Object("filename1").NewWriter(ctx) - wc.ContentType = "text/plain" - wc.ACL = []storage.ACLRule{{Entity: storage.AllUsers, Role: storage.RoleReader}} - if _, err := wc.Write([]byte("hello world")); err != nil { - // TODO: handle error. - // Note that Write may return nil in some error situations, - // so always check the error from Close. - } - if err := wc.Close(); err != nil { - // TODO: handle error. - } - fmt.Println("updated object:", wc.Attrs()) -} - -// [END storage_generated_storage_Writer_Write] diff --git a/internal/generated/snippets/storage/Writer/Write/timeout/main.go b/internal/generated/snippets/storage/Writer/Write/timeout/main.go deleted file mode 100644 index e0dc6cc3068..00000000000 --- a/internal/generated/snippets/storage/Writer/Write/timeout/main.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START storage_generated_storage_Writer_Write_timeout] - -package main - -import ( - "context" - "fmt" - "time" - - "cloud.google.com/go/storage" -) - -func main() { - ctx := context.Background() - client, err := storage.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - tctx, cancel := context.WithTimeout(ctx, 30*time.Second) - defer cancel() // Cancel when done, whether we time out or not. - wc := client.Bucket("bucketname").Object("filename1").NewWriter(tctx) - wc.ContentType = "text/plain" - wc.ACL = []storage.ACLRule{{Entity: storage.AllUsers, Role: storage.RoleReader}} - if _, err := wc.Write([]byte("hello world")); err != nil { - // TODO: handle error. - // Note that Write may return nil in some error situations, - // so always check the error from Close. - } - if err := wc.Close(); err != nil { - // TODO: handle error. - } - fmt.Println("updated object:", wc.Attrs()) -} - -// [END storage_generated_storage_Writer_Write_timeout] diff --git a/internal/generated/snippets/talent/apiv4/CompanyClient/CreateCompany/main.go b/internal/generated/snippets/talent/apiv4/CompanyClient/CreateCompany/main.go index 0da5c8bd466..306fb882e37 100644 --- a/internal/generated/snippets/talent/apiv4/CompanyClient/CreateCompany/main.go +++ b/internal/generated/snippets/talent/apiv4/CompanyClient/CreateCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_CompanyClient_CreateCompany] +// [START jobs_v4_generated_CompanyService_CreateCompany_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_CompanyClient_CreateCompany] +// [END jobs_v4_generated_CompanyService_CreateCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4/CompanyClient/DeleteCompany/main.go b/internal/generated/snippets/talent/apiv4/CompanyClient/DeleteCompany/main.go index ddd07849dbc..e5a8132bf02 100644 --- a/internal/generated/snippets/talent/apiv4/CompanyClient/DeleteCompany/main.go +++ b/internal/generated/snippets/talent/apiv4/CompanyClient/DeleteCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_CompanyClient_DeleteCompany] +// [START jobs_v4_generated_CompanyService_DeleteCompany_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4_CompanyClient_DeleteCompany] +// [END jobs_v4_generated_CompanyService_DeleteCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4/CompanyClient/GetCompany/main.go b/internal/generated/snippets/talent/apiv4/CompanyClient/GetCompany/main.go index 786f6fd3914..70a0eb97674 100644 --- a/internal/generated/snippets/talent/apiv4/CompanyClient/GetCompany/main.go +++ b/internal/generated/snippets/talent/apiv4/CompanyClient/GetCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_CompanyClient_GetCompany] +// [START jobs_v4_generated_CompanyService_GetCompany_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_CompanyClient_GetCompany] +// [END jobs_v4_generated_CompanyService_GetCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4/CompanyClient/ListCompanies/main.go b/internal/generated/snippets/talent/apiv4/CompanyClient/ListCompanies/main.go index f81787e35c2..bfb84c042c7 100644 --- a/internal/generated/snippets/talent/apiv4/CompanyClient/ListCompanies/main.go +++ b/internal/generated/snippets/talent/apiv4/CompanyClient/ListCompanies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_CompanyClient_ListCompanies] +// [START jobs_v4_generated_CompanyService_ListCompanies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4_CompanyClient_ListCompanies] +// [END jobs_v4_generated_CompanyService_ListCompanies_sync] diff --git a/internal/generated/snippets/talent/apiv4/CompanyClient/NewCompanyClient/main.go b/internal/generated/snippets/talent/apiv4/CompanyClient/NewCompanyClient/main.go deleted file mode 100644 index 83ffa300b0f..00000000000 --- a/internal/generated/snippets/talent/apiv4/CompanyClient/NewCompanyClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4_NewCompanyClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4" -) - -func main() { - ctx := context.Background() - c, err := talent.NewCompanyClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4_NewCompanyClient] diff --git a/internal/generated/snippets/talent/apiv4/CompanyClient/UpdateCompany/main.go b/internal/generated/snippets/talent/apiv4/CompanyClient/UpdateCompany/main.go index 007c46c8377..b59014ff1ef 100644 --- a/internal/generated/snippets/talent/apiv4/CompanyClient/UpdateCompany/main.go +++ b/internal/generated/snippets/talent/apiv4/CompanyClient/UpdateCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_CompanyClient_UpdateCompany] +// [START jobs_v4_generated_CompanyService_UpdateCompany_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_CompanyClient_UpdateCompany] +// [END jobs_v4_generated_CompanyService_UpdateCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4/CompletionClient/CompleteQuery/main.go b/internal/generated/snippets/talent/apiv4/CompletionClient/CompleteQuery/main.go index 85c8abab490..bc943b31570 100644 --- a/internal/generated/snippets/talent/apiv4/CompletionClient/CompleteQuery/main.go +++ b/internal/generated/snippets/talent/apiv4/CompletionClient/CompleteQuery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_CompletionClient_CompleteQuery] +// [START jobs_v4_generated_Completion_CompleteQuery_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_CompletionClient_CompleteQuery] +// [END jobs_v4_generated_Completion_CompleteQuery_sync] diff --git a/internal/generated/snippets/talent/apiv4/CompletionClient/NewCompletionClient/main.go b/internal/generated/snippets/talent/apiv4/CompletionClient/NewCompletionClient/main.go deleted file mode 100644 index 41020edd26f..00000000000 --- a/internal/generated/snippets/talent/apiv4/CompletionClient/NewCompletionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4_NewCompletionClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4" -) - -func main() { - ctx := context.Background() - c, err := talent.NewCompletionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4_NewCompletionClient] diff --git a/internal/generated/snippets/talent/apiv4/EventClient/CreateClientEvent/main.go b/internal/generated/snippets/talent/apiv4/EventClient/CreateClientEvent/main.go index 21a2756161c..d9aec3f7b9f 100644 --- a/internal/generated/snippets/talent/apiv4/EventClient/CreateClientEvent/main.go +++ b/internal/generated/snippets/talent/apiv4/EventClient/CreateClientEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_EventClient_CreateClientEvent] +// [START jobs_v4_generated_EventService_CreateClientEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_EventClient_CreateClientEvent] +// [END jobs_v4_generated_EventService_CreateClientEvent_sync] diff --git a/internal/generated/snippets/talent/apiv4/EventClient/NewEventClient/main.go b/internal/generated/snippets/talent/apiv4/EventClient/NewEventClient/main.go deleted file mode 100644 index c4afa9bf719..00000000000 --- a/internal/generated/snippets/talent/apiv4/EventClient/NewEventClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4_NewEventClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4" -) - -func main() { - ctx := context.Background() - c, err := talent.NewEventClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4_NewEventClient] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/BatchCreateJobs/main.go b/internal/generated/snippets/talent/apiv4/JobClient/BatchCreateJobs/main.go index 0924b31a9d3..732fd4a2adb 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/BatchCreateJobs/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/BatchCreateJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_BatchCreateJobs] +// [START jobs_v4_generated_JobService_BatchCreateJobs_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_BatchCreateJobs] +// [END jobs_v4_generated_JobService_BatchCreateJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/BatchDeleteJobs/main.go b/internal/generated/snippets/talent/apiv4/JobClient/BatchDeleteJobs/main.go index d9d523354b2..d3ed21b0bee 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/BatchDeleteJobs/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/BatchDeleteJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_BatchDeleteJobs] +// [START jobs_v4_generated_JobService_BatchDeleteJobs_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_BatchDeleteJobs] +// [END jobs_v4_generated_JobService_BatchDeleteJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/BatchUpdateJobs/main.go b/internal/generated/snippets/talent/apiv4/JobClient/BatchUpdateJobs/main.go index 1a9ab7f8c12..fd5c24c40d6 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/BatchUpdateJobs/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/BatchUpdateJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_BatchUpdateJobs] +// [START jobs_v4_generated_JobService_BatchUpdateJobs_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_BatchUpdateJobs] +// [END jobs_v4_generated_JobService_BatchUpdateJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/CreateJob/main.go b/internal/generated/snippets/talent/apiv4/JobClient/CreateJob/main.go index 1e4d6fb770d..8ea55caacd4 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/CreateJob/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/CreateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_CreateJob] +// [START jobs_v4_generated_JobService_CreateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_CreateJob] +// [END jobs_v4_generated_JobService_CreateJob_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/DeleteJob/main.go b/internal/generated/snippets/talent/apiv4/JobClient/DeleteJob/main.go index 0f55076e144..2b45a9f5f05 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/DeleteJob/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_DeleteJob] +// [START jobs_v4_generated_JobService_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4_JobClient_DeleteJob] +// [END jobs_v4_generated_JobService_DeleteJob_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/GetJob/main.go b/internal/generated/snippets/talent/apiv4/JobClient/GetJob/main.go index fc1a67648ec..c53da490069 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/GetJob/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_GetJob] +// [START jobs_v4_generated_JobService_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_GetJob] +// [END jobs_v4_generated_JobService_GetJob_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/ListJobs/main.go b/internal/generated/snippets/talent/apiv4/JobClient/ListJobs/main.go index f428d4055e7..94989e1e9f7 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/ListJobs/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_ListJobs] +// [START jobs_v4_generated_JobService_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4_JobClient_ListJobs] +// [END jobs_v4_generated_JobService_ListJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/NewJobClient/main.go b/internal/generated/snippets/talent/apiv4/JobClient/NewJobClient/main.go deleted file mode 100644 index 2682196bd42..00000000000 --- a/internal/generated/snippets/talent/apiv4/JobClient/NewJobClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4_NewJobClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4" -) - -func main() { - ctx := context.Background() - c, err := talent.NewJobClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4_NewJobClient] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/SearchJobs/main.go b/internal/generated/snippets/talent/apiv4/JobClient/SearchJobs/main.go index 5b14a9efbb9..cb6857b9d1b 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/SearchJobs/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/SearchJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_SearchJobs] +// [START jobs_v4_generated_JobService_SearchJobs_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_SearchJobs] +// [END jobs_v4_generated_JobService_SearchJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/SearchJobsForAlert/main.go b/internal/generated/snippets/talent/apiv4/JobClient/SearchJobsForAlert/main.go index 02dfff97c56..216194bdde1 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/SearchJobsForAlert/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/SearchJobsForAlert/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_SearchJobsForAlert] +// [START jobs_v4_generated_JobService_SearchJobsForAlert_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_SearchJobsForAlert] +// [END jobs_v4_generated_JobService_SearchJobsForAlert_sync] diff --git a/internal/generated/snippets/talent/apiv4/JobClient/UpdateJob/main.go b/internal/generated/snippets/talent/apiv4/JobClient/UpdateJob/main.go index 043d10018a1..8e464ee56b5 100644 --- a/internal/generated/snippets/talent/apiv4/JobClient/UpdateJob/main.go +++ b/internal/generated/snippets/talent/apiv4/JobClient/UpdateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_JobClient_UpdateJob] +// [START jobs_v4_generated_JobService_UpdateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_JobClient_UpdateJob] +// [END jobs_v4_generated_JobService_UpdateJob_sync] diff --git a/internal/generated/snippets/talent/apiv4/TenantClient/CreateTenant/main.go b/internal/generated/snippets/talent/apiv4/TenantClient/CreateTenant/main.go index cd1cabba8e0..6c564920ac1 100644 --- a/internal/generated/snippets/talent/apiv4/TenantClient/CreateTenant/main.go +++ b/internal/generated/snippets/talent/apiv4/TenantClient/CreateTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_TenantClient_CreateTenant] +// [START jobs_v4_generated_TenantService_CreateTenant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_TenantClient_CreateTenant] +// [END jobs_v4_generated_TenantService_CreateTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4/TenantClient/DeleteTenant/main.go b/internal/generated/snippets/talent/apiv4/TenantClient/DeleteTenant/main.go index bc2de2caf3d..aaf9bcf7e84 100644 --- a/internal/generated/snippets/talent/apiv4/TenantClient/DeleteTenant/main.go +++ b/internal/generated/snippets/talent/apiv4/TenantClient/DeleteTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_TenantClient_DeleteTenant] +// [START jobs_v4_generated_TenantService_DeleteTenant_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4_TenantClient_DeleteTenant] +// [END jobs_v4_generated_TenantService_DeleteTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4/TenantClient/GetTenant/main.go b/internal/generated/snippets/talent/apiv4/TenantClient/GetTenant/main.go index 541e3493a95..596c4e446cc 100644 --- a/internal/generated/snippets/talent/apiv4/TenantClient/GetTenant/main.go +++ b/internal/generated/snippets/talent/apiv4/TenantClient/GetTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_TenantClient_GetTenant] +// [START jobs_v4_generated_TenantService_GetTenant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_TenantClient_GetTenant] +// [END jobs_v4_generated_TenantService_GetTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4/TenantClient/ListTenants/main.go b/internal/generated/snippets/talent/apiv4/TenantClient/ListTenants/main.go index 3e62beb0a5d..42547127dd8 100644 --- a/internal/generated/snippets/talent/apiv4/TenantClient/ListTenants/main.go +++ b/internal/generated/snippets/talent/apiv4/TenantClient/ListTenants/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_TenantClient_ListTenants] +// [START jobs_v4_generated_TenantService_ListTenants_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4_TenantClient_ListTenants] +// [END jobs_v4_generated_TenantService_ListTenants_sync] diff --git a/internal/generated/snippets/talent/apiv4/TenantClient/NewTenantClient/main.go b/internal/generated/snippets/talent/apiv4/TenantClient/NewTenantClient/main.go deleted file mode 100644 index 7558f6f02c8..00000000000 --- a/internal/generated/snippets/talent/apiv4/TenantClient/NewTenantClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4_NewTenantClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4" -) - -func main() { - ctx := context.Background() - c, err := talent.NewTenantClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4_NewTenantClient] diff --git a/internal/generated/snippets/talent/apiv4/TenantClient/UpdateTenant/main.go b/internal/generated/snippets/talent/apiv4/TenantClient/UpdateTenant/main.go index deb87c8d65f..5254f578c20 100644 --- a/internal/generated/snippets/talent/apiv4/TenantClient/UpdateTenant/main.go +++ b/internal/generated/snippets/talent/apiv4/TenantClient/UpdateTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4_TenantClient_UpdateTenant] +// [START jobs_v4_generated_TenantService_UpdateTenant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4_TenantClient_UpdateTenant] +// [END jobs_v4_generated_TenantService_UpdateTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/CreateApplication/main.go b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/CreateApplication/main.go index 78c3ae45247..3f12b25d8d1 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/CreateApplication/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/CreateApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ApplicationClient_CreateApplication] +// [START jobs_v4beta1_generated_ApplicationService_CreateApplication_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ApplicationClient_CreateApplication] +// [END jobs_v4beta1_generated_ApplicationService_CreateApplication_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/DeleteApplication/main.go b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/DeleteApplication/main.go index fdd0fcd9800..2bc6e34e049 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/DeleteApplication/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/DeleteApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ApplicationClient_DeleteApplication] +// [START jobs_v4beta1_generated_ApplicationService_DeleteApplication_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_ApplicationClient_DeleteApplication] +// [END jobs_v4beta1_generated_ApplicationService_DeleteApplication_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/GetApplication/main.go b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/GetApplication/main.go index a5197a99896..d008aca5d50 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/GetApplication/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/GetApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ApplicationClient_GetApplication] +// [START jobs_v4beta1_generated_ApplicationService_GetApplication_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ApplicationClient_GetApplication] +// [END jobs_v4beta1_generated_ApplicationService_GetApplication_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/ListApplications/main.go b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/ListApplications/main.go index 5480fc60888..c08d17b5a13 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/ListApplications/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/ListApplications/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ApplicationClient_ListApplications] +// [START jobs_v4beta1_generated_ApplicationService_ListApplications_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_ApplicationClient_ListApplications] +// [END jobs_v4beta1_generated_ApplicationService_ListApplications_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/NewApplicationClient/main.go b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/NewApplicationClient/main.go deleted file mode 100644 index f0e23686c3c..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/NewApplicationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewApplicationClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewApplicationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewApplicationClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/UpdateApplication/main.go b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/UpdateApplication/main.go index b912c999a12..5d7a302ea80 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/UpdateApplication/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ApplicationClient/UpdateApplication/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ApplicationClient_UpdateApplication] +// [START jobs_v4beta1_generated_ApplicationService_UpdateApplication_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ApplicationClient_UpdateApplication] +// [END jobs_v4beta1_generated_ApplicationService_UpdateApplication_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/CreateCompany/main.go b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/CreateCompany/main.go index 293c9840a5f..cf9ab67f307 100644 --- a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/CreateCompany/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/CreateCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_CompanyClient_CreateCompany] +// [START jobs_v4beta1_generated_CompanyService_CreateCompany_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_CompanyClient_CreateCompany] +// [END jobs_v4beta1_generated_CompanyService_CreateCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/DeleteCompany/main.go b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/DeleteCompany/main.go index 6c631acad47..f42bf2520c3 100644 --- a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/DeleteCompany/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/DeleteCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_CompanyClient_DeleteCompany] +// [START jobs_v4beta1_generated_CompanyService_DeleteCompany_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_CompanyClient_DeleteCompany] +// [END jobs_v4beta1_generated_CompanyService_DeleteCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/GetCompany/main.go b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/GetCompany/main.go index 50dc33688cc..0388ab93843 100644 --- a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/GetCompany/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/GetCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_CompanyClient_GetCompany] +// [START jobs_v4beta1_generated_CompanyService_GetCompany_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_CompanyClient_GetCompany] +// [END jobs_v4beta1_generated_CompanyService_GetCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/ListCompanies/main.go b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/ListCompanies/main.go index 6e2e4c3336d..39649656c73 100644 --- a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/ListCompanies/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/ListCompanies/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_CompanyClient_ListCompanies] +// [START jobs_v4beta1_generated_CompanyService_ListCompanies_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_CompanyClient_ListCompanies] +// [END jobs_v4beta1_generated_CompanyService_ListCompanies_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/NewCompanyClient/main.go b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/NewCompanyClient/main.go deleted file mode 100644 index c91af8366d3..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/NewCompanyClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewCompanyClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewCompanyClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewCompanyClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/UpdateCompany/main.go b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/UpdateCompany/main.go index bbf2bd11b89..fc4b747fa00 100644 --- a/internal/generated/snippets/talent/apiv4beta1/CompanyClient/UpdateCompany/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/CompanyClient/UpdateCompany/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_CompanyClient_UpdateCompany] +// [START jobs_v4beta1_generated_CompanyService_UpdateCompany_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_CompanyClient_UpdateCompany] +// [END jobs_v4beta1_generated_CompanyService_UpdateCompany_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompletionClient/CompleteQuery/main.go b/internal/generated/snippets/talent/apiv4beta1/CompletionClient/CompleteQuery/main.go index bc9ee60aa5b..66827c6dc49 100644 --- a/internal/generated/snippets/talent/apiv4beta1/CompletionClient/CompleteQuery/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/CompletionClient/CompleteQuery/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_CompletionClient_CompleteQuery] +// [START jobs_v4beta1_generated_Completion_CompleteQuery_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_CompletionClient_CompleteQuery] +// [END jobs_v4beta1_generated_Completion_CompleteQuery_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/CompletionClient/NewCompletionClient/main.go b/internal/generated/snippets/talent/apiv4beta1/CompletionClient/NewCompletionClient/main.go deleted file mode 100644 index 0bdaaad3dac..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/CompletionClient/NewCompletionClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewCompletionClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewCompletionClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewCompletionClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/EventClient/CreateClientEvent/main.go b/internal/generated/snippets/talent/apiv4beta1/EventClient/CreateClientEvent/main.go index 96d9a175112..9bd965718d7 100644 --- a/internal/generated/snippets/talent/apiv4beta1/EventClient/CreateClientEvent/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/EventClient/CreateClientEvent/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_EventClient_CreateClientEvent] +// [START jobs_v4beta1_generated_EventService_CreateClientEvent_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_EventClient_CreateClientEvent] +// [END jobs_v4beta1_generated_EventService_CreateClientEvent_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/EventClient/NewEventClient/main.go b/internal/generated/snippets/talent/apiv4beta1/EventClient/NewEventClient/main.go deleted file mode 100644 index 3cac2e3fc23..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/EventClient/NewEventClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewEventClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewEventClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewEventClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchCreateJobs/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchCreateJobs/main.go index 7b7dc868a4e..a13d2fb2048 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchCreateJobs/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchCreateJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_BatchCreateJobs] +// [START jobs_v4beta1_generated_JobService_BatchCreateJobs_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_JobClient_BatchCreateJobs] +// [END jobs_v4beta1_generated_JobService_BatchCreateJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchDeleteJobs/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchDeleteJobs/main.go index 01a5b709b23..f8b8aceb5b2 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchDeleteJobs/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchDeleteJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_BatchDeleteJobs] +// [START jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_JobClient_BatchDeleteJobs] +// [END jobs_v4beta1_generated_JobService_BatchDeleteJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchUpdateJobs/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchUpdateJobs/main.go index 4c02de09445..538ed734471 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchUpdateJobs/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/BatchUpdateJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_BatchUpdateJobs] +// [START jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_JobClient_BatchUpdateJobs] +// [END jobs_v4beta1_generated_JobService_BatchUpdateJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/CreateJob/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/CreateJob/main.go index 98ff62e1bc4..7807694abe2 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/CreateJob/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/CreateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_CreateJob] +// [START jobs_v4beta1_generated_JobService_CreateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_JobClient_CreateJob] +// [END jobs_v4beta1_generated_JobService_CreateJob_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/DeleteJob/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/DeleteJob/main.go index 5ace84215a4..3ec38b38f1e 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/DeleteJob/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_DeleteJob] +// [START jobs_v4beta1_generated_JobService_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_JobClient_DeleteJob] +// [END jobs_v4beta1_generated_JobService_DeleteJob_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/GetJob/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/GetJob/main.go index 055fe657806..5d6d3abe375 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/GetJob/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_GetJob] +// [START jobs_v4beta1_generated_JobService_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_JobClient_GetJob] +// [END jobs_v4beta1_generated_JobService_GetJob_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/ListJobs/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/ListJobs/main.go index c2c77fc59c1..1b30391e6f0 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/ListJobs/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_ListJobs] +// [START jobs_v4beta1_generated_JobService_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_JobClient_ListJobs] +// [END jobs_v4beta1_generated_JobService_ListJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/NewJobClient/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/NewJobClient/main.go deleted file mode 100644 index d44da6412cb..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/NewJobClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewJobClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewJobClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewJobClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobs/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobs/main.go index 47427ac36ff..b57c49ea95a 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobs/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_SearchJobs] +// [START jobs_v4beta1_generated_JobService_SearchJobs_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_JobClient_SearchJobs] +// [END jobs_v4beta1_generated_JobService_SearchJobs_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobsForAlert/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobsForAlert/main.go index f8281c4d8b2..73e2e2408a3 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobsForAlert/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/SearchJobsForAlert/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_SearchJobsForAlert] +// [START jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_JobClient_SearchJobsForAlert] +// [END jobs_v4beta1_generated_JobService_SearchJobsForAlert_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/JobClient/UpdateJob/main.go b/internal/generated/snippets/talent/apiv4beta1/JobClient/UpdateJob/main.go index 5ede9cdd49c..b81c7e7073e 100644 --- a/internal/generated/snippets/talent/apiv4beta1/JobClient/UpdateJob/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/JobClient/UpdateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_JobClient_UpdateJob] +// [START jobs_v4beta1_generated_JobService_UpdateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_JobClient_UpdateJob] +// [END jobs_v4beta1_generated_JobService_UpdateJob_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/CreateProfile/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/CreateProfile/main.go index d86b13764fb..a6d1a22825c 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/CreateProfile/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/CreateProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ProfileClient_CreateProfile] +// [START jobs_v4beta1_generated_ProfileService_CreateProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ProfileClient_CreateProfile] +// [END jobs_v4beta1_generated_ProfileService_CreateProfile_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/DeleteProfile/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/DeleteProfile/main.go index 713d158711b..13416400c41 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/DeleteProfile/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/DeleteProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ProfileClient_DeleteProfile] +// [START jobs_v4beta1_generated_ProfileService_DeleteProfile_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_ProfileClient_DeleteProfile] +// [END jobs_v4beta1_generated_ProfileService_DeleteProfile_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/GetProfile/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/GetProfile/main.go index 32507afaa82..c247699a395 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/GetProfile/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/GetProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ProfileClient_GetProfile] +// [START jobs_v4beta1_generated_ProfileService_GetProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ProfileClient_GetProfile] +// [END jobs_v4beta1_generated_ProfileService_GetProfile_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/ListProfiles/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/ListProfiles/main.go index 6c88bd53ed2..006bac47b19 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/ListProfiles/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/ListProfiles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ProfileClient_ListProfiles] +// [START jobs_v4beta1_generated_ProfileService_ListProfiles_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_ProfileClient_ListProfiles] +// [END jobs_v4beta1_generated_ProfileService_ListProfiles_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/NewProfileClient/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/NewProfileClient/main.go deleted file mode 100644 index e279b902960..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/NewProfileClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewProfileClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewProfileClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewProfileClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/SearchProfiles/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/SearchProfiles/main.go index 9c9d52f88d8..4a2f20910fe 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/SearchProfiles/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/SearchProfiles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ProfileClient_SearchProfiles] +// [START jobs_v4beta1_generated_ProfileService_SearchProfiles_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ProfileClient_SearchProfiles] +// [END jobs_v4beta1_generated_ProfileService_SearchProfiles_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/UpdateProfile/main.go b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/UpdateProfile/main.go index 797107b6cab..ea7f0cbc74b 100644 --- a/internal/generated/snippets/talent/apiv4beta1/ProfileClient/UpdateProfile/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/ProfileClient/UpdateProfile/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_ProfileClient_UpdateProfile] +// [START jobs_v4beta1_generated_ProfileService_UpdateProfile_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_ProfileClient_UpdateProfile] +// [END jobs_v4beta1_generated_ProfileService_UpdateProfile_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/TenantClient/CreateTenant/main.go b/internal/generated/snippets/talent/apiv4beta1/TenantClient/CreateTenant/main.go index 367db8189db..fc6f87036ed 100644 --- a/internal/generated/snippets/talent/apiv4beta1/TenantClient/CreateTenant/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/TenantClient/CreateTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_TenantClient_CreateTenant] +// [START jobs_v4beta1_generated_TenantService_CreateTenant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_TenantClient_CreateTenant] +// [END jobs_v4beta1_generated_TenantService_CreateTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/TenantClient/DeleteTenant/main.go b/internal/generated/snippets/talent/apiv4beta1/TenantClient/DeleteTenant/main.go index 73f22a6cb4b..02a0271ee0b 100644 --- a/internal/generated/snippets/talent/apiv4beta1/TenantClient/DeleteTenant/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/TenantClient/DeleteTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_TenantClient_DeleteTenant] +// [START jobs_v4beta1_generated_TenantService_DeleteTenant_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_TenantClient_DeleteTenant] +// [END jobs_v4beta1_generated_TenantService_DeleteTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/TenantClient/GetTenant/main.go b/internal/generated/snippets/talent/apiv4beta1/TenantClient/GetTenant/main.go index a16a34ca5f1..6f721d56c2e 100644 --- a/internal/generated/snippets/talent/apiv4beta1/TenantClient/GetTenant/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/TenantClient/GetTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_TenantClient_GetTenant] +// [START jobs_v4beta1_generated_TenantService_GetTenant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_TenantClient_GetTenant] +// [END jobs_v4beta1_generated_TenantService_GetTenant_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/TenantClient/ListTenants/main.go b/internal/generated/snippets/talent/apiv4beta1/TenantClient/ListTenants/main.go index 472cb70064a..027b061cb60 100644 --- a/internal/generated/snippets/talent/apiv4beta1/TenantClient/ListTenants/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/TenantClient/ListTenants/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_TenantClient_ListTenants] +// [START jobs_v4beta1_generated_TenantService_ListTenants_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END jobs_generated_talent_apiv4beta1_TenantClient_ListTenants] +// [END jobs_v4beta1_generated_TenantService_ListTenants_sync] diff --git a/internal/generated/snippets/talent/apiv4beta1/TenantClient/NewTenantClient/main.go b/internal/generated/snippets/talent/apiv4beta1/TenantClient/NewTenantClient/main.go deleted file mode 100644 index a5959acfc2d..00000000000 --- a/internal/generated/snippets/talent/apiv4beta1/TenantClient/NewTenantClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START jobs_generated_talent_apiv4beta1_NewTenantClient] - -package main - -import ( - "context" - - talent "cloud.google.com/go/talent/apiv4beta1" -) - -func main() { - ctx := context.Background() - c, err := talent.NewTenantClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END jobs_generated_talent_apiv4beta1_NewTenantClient] diff --git a/internal/generated/snippets/talent/apiv4beta1/TenantClient/UpdateTenant/main.go b/internal/generated/snippets/talent/apiv4beta1/TenantClient/UpdateTenant/main.go index 987c1e2b84b..7be0f7d173b 100644 --- a/internal/generated/snippets/talent/apiv4beta1/TenantClient/UpdateTenant/main.go +++ b/internal/generated/snippets/talent/apiv4beta1/TenantClient/UpdateTenant/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START jobs_generated_talent_apiv4beta1_TenantClient_UpdateTenant] +// [START jobs_v4beta1_generated_TenantService_UpdateTenant_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END jobs_generated_talent_apiv4beta1_TenantClient_UpdateTenant] +// [END jobs_v4beta1_generated_TenantService_UpdateTenant_sync] diff --git a/internal/generated/snippets/texttospeech/apiv1/Client/ListVoices/main.go b/internal/generated/snippets/texttospeech/apiv1/Client/ListVoices/main.go index e8f9905a167..1eb362b4a2b 100644 --- a/internal/generated/snippets/texttospeech/apiv1/Client/ListVoices/main.go +++ b/internal/generated/snippets/texttospeech/apiv1/Client/ListVoices/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START texttospeech_generated_texttospeech_apiv1_Client_ListVoices] +// [START texttospeech_v1_generated_TextToSpeech_ListVoices_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END texttospeech_generated_texttospeech_apiv1_Client_ListVoices] +// [END texttospeech_v1_generated_TextToSpeech_ListVoices_sync] diff --git a/internal/generated/snippets/texttospeech/apiv1/Client/NewClient/main.go b/internal/generated/snippets/texttospeech/apiv1/Client/NewClient/main.go deleted file mode 100644 index d340f7749e8..00000000000 --- a/internal/generated/snippets/texttospeech/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START texttospeech_generated_texttospeech_apiv1_NewClient] - -package main - -import ( - "context" - - texttospeech "cloud.google.com/go/texttospeech/apiv1" -) - -func main() { - ctx := context.Background() - c, err := texttospeech.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END texttospeech_generated_texttospeech_apiv1_NewClient] diff --git a/internal/generated/snippets/texttospeech/apiv1/Client/SynthesizeSpeech/main.go b/internal/generated/snippets/texttospeech/apiv1/Client/SynthesizeSpeech/main.go index a4c10b2f950..18ef1cdeb74 100644 --- a/internal/generated/snippets/texttospeech/apiv1/Client/SynthesizeSpeech/main.go +++ b/internal/generated/snippets/texttospeech/apiv1/Client/SynthesizeSpeech/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START texttospeech_generated_texttospeech_apiv1_Client_SynthesizeSpeech] +// [START texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END texttospeech_generated_texttospeech_apiv1_Client_SynthesizeSpeech] +// [END texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_sync] diff --git a/internal/generated/snippets/trace/apiv1/Client/GetTrace/main.go b/internal/generated/snippets/trace/apiv1/Client/GetTrace/main.go index ae450ac7108..ad492373e4b 100644 --- a/internal/generated/snippets/trace/apiv1/Client/GetTrace/main.go +++ b/internal/generated/snippets/trace/apiv1/Client/GetTrace/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtrace_generated_trace_apiv1_Client_GetTrace] +// [START cloudtrace_v1_generated_TraceService_GetTrace_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtrace_generated_trace_apiv1_Client_GetTrace] +// [END cloudtrace_v1_generated_TraceService_GetTrace_sync] diff --git a/internal/generated/snippets/trace/apiv1/Client/ListTraces/main.go b/internal/generated/snippets/trace/apiv1/Client/ListTraces/main.go index d0a5491b0b9..9813eb9707a 100644 --- a/internal/generated/snippets/trace/apiv1/Client/ListTraces/main.go +++ b/internal/generated/snippets/trace/apiv1/Client/ListTraces/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtrace_generated_trace_apiv1_Client_ListTraces] +// [START cloudtrace_v1_generated_TraceService_ListTraces_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END cloudtrace_generated_trace_apiv1_Client_ListTraces] +// [END cloudtrace_v1_generated_TraceService_ListTraces_sync] diff --git a/internal/generated/snippets/trace/apiv1/Client/NewClient/main.go b/internal/generated/snippets/trace/apiv1/Client/NewClient/main.go deleted file mode 100644 index b7c8110c4d0..00000000000 --- a/internal/generated/snippets/trace/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudtrace_generated_trace_apiv1_NewClient] - -package main - -import ( - "context" - - trace "cloud.google.com/go/trace/apiv1" -) - -func main() { - ctx := context.Background() - c, err := trace.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudtrace_generated_trace_apiv1_NewClient] diff --git a/internal/generated/snippets/trace/apiv1/Client/PatchTraces/main.go b/internal/generated/snippets/trace/apiv1/Client/PatchTraces/main.go index b3e06a2880b..c0a7a8cc371 100644 --- a/internal/generated/snippets/trace/apiv1/Client/PatchTraces/main.go +++ b/internal/generated/snippets/trace/apiv1/Client/PatchTraces/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtrace_generated_trace_apiv1_Client_PatchTraces] +// [START cloudtrace_v1_generated_TraceService_PatchTraces_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtrace_generated_trace_apiv1_Client_PatchTraces] +// [END cloudtrace_v1_generated_TraceService_PatchTraces_sync] diff --git a/internal/generated/snippets/trace/apiv2/Client/BatchWriteSpans/main.go b/internal/generated/snippets/trace/apiv2/Client/BatchWriteSpans/main.go index 5ac29fe08e8..cfbdecc9581 100644 --- a/internal/generated/snippets/trace/apiv2/Client/BatchWriteSpans/main.go +++ b/internal/generated/snippets/trace/apiv2/Client/BatchWriteSpans/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtrace_generated_trace_apiv2_Client_BatchWriteSpans] +// [START cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END cloudtrace_generated_trace_apiv2_Client_BatchWriteSpans] +// [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] diff --git a/internal/generated/snippets/trace/apiv2/Client/CreateSpan/main.go b/internal/generated/snippets/trace/apiv2/Client/CreateSpan/main.go index a9f703dcb1a..59c3becc317 100644 --- a/internal/generated/snippets/trace/apiv2/Client/CreateSpan/main.go +++ b/internal/generated/snippets/trace/apiv2/Client/CreateSpan/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START cloudtrace_generated_trace_apiv2_Client_CreateSpan] +// [START cloudtrace_v2_generated_TraceService_CreateSpan_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END cloudtrace_generated_trace_apiv2_Client_CreateSpan] +// [END cloudtrace_v2_generated_TraceService_CreateSpan_sync] diff --git a/internal/generated/snippets/trace/apiv2/Client/NewClient/main.go b/internal/generated/snippets/trace/apiv2/Client/NewClient/main.go deleted file mode 100644 index 71f280a3752..00000000000 --- a/internal/generated/snippets/trace/apiv2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START cloudtrace_generated_trace_apiv2_NewClient] - -package main - -import ( - "context" - - trace "cloud.google.com/go/trace/apiv2" -) - -func main() { - ctx := context.Background() - c, err := trace.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END cloudtrace_generated_trace_apiv2_NewClient] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/BatchTranslateText/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/BatchTranslateText/main.go index 9eb26a01a7d..9f93a4cf7ed 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/BatchTranslateText/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/BatchTranslateText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_BatchTranslateText] +// [START translate_v3_generated_TranslationService_BatchTranslateText_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_BatchTranslateText] +// [END translate_v3_generated_TranslationService_BatchTranslateText_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/CreateGlossary/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/CreateGlossary/main.go index a911838dba3..fa561e6480c 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/CreateGlossary/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/CreateGlossary/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_CreateGlossary] +// [START translate_v3_generated_TranslationService_CreateGlossary_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_CreateGlossary] +// [END translate_v3_generated_TranslationService_CreateGlossary_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/DeleteGlossary/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/DeleteGlossary/main.go index b3d38c279d7..9c8f9d180ad 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/DeleteGlossary/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/DeleteGlossary/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_DeleteGlossary] +// [START translate_v3_generated_TranslationService_DeleteGlossary_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_DeleteGlossary] +// [END translate_v3_generated_TranslationService_DeleteGlossary_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/DetectLanguage/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/DetectLanguage/main.go index c2136af1645..a697288ff9c 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/DetectLanguage/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/DetectLanguage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_DetectLanguage] +// [START translate_v3_generated_TranslationService_DetectLanguage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_DetectLanguage] +// [END translate_v3_generated_TranslationService_DetectLanguage_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/GetGlossary/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/GetGlossary/main.go index 8831d603575..ca272b95381 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/GetGlossary/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/GetGlossary/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_GetGlossary] +// [START translate_v3_generated_TranslationService_GetGlossary_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_GetGlossary] +// [END translate_v3_generated_TranslationService_GetGlossary_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/GetSupportedLanguages/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/GetSupportedLanguages/main.go index 569bfbdc5c0..3ec7586ecff 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/GetSupportedLanguages/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/GetSupportedLanguages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_GetSupportedLanguages] +// [START translate_v3_generated_TranslationService_GetSupportedLanguages_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_GetSupportedLanguages] +// [END translate_v3_generated_TranslationService_GetSupportedLanguages_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/ListGlossaries/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/ListGlossaries/main.go index 321d66d8481..b8aa9f5188e 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/ListGlossaries/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/ListGlossaries/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_ListGlossaries] +// [START translate_v3_generated_TranslationService_ListGlossaries_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END translate_generated_translate_apiv3_TranslationClient_ListGlossaries] +// [END translate_v3_generated_TranslationService_ListGlossaries_sync] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/NewTranslationClient/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/NewTranslationClient/main.go deleted file mode 100644 index 24e156a5da9..00000000000 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/NewTranslationClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START translate_generated_translate_apiv3_NewTranslationClient] - -package main - -import ( - "context" - - translate "cloud.google.com/go/translate/apiv3" -) - -func main() { - ctx := context.Background() - c, err := translate.NewTranslationClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END translate_generated_translate_apiv3_NewTranslationClient] diff --git a/internal/generated/snippets/translate/apiv3/TranslationClient/TranslateText/main.go b/internal/generated/snippets/translate/apiv3/TranslationClient/TranslateText/main.go index a6e503faf21..ec421b1e1e6 100644 --- a/internal/generated/snippets/translate/apiv3/TranslationClient/TranslateText/main.go +++ b/internal/generated/snippets/translate/apiv3/TranslationClient/TranslateText/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START translate_generated_translate_apiv3_TranslationClient_TranslateText] +// [START translate_v3_generated_TranslationService_TranslateText_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END translate_generated_translate_apiv3_TranslationClient_TranslateText] +// [END translate_v3_generated_TranslationService_TranslateText_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJob/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJob/main.go index e647bc6dcde..af6f0136172 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJob/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_CreateJob] +// [START transcoder_v1beta1_generated_TranscoderService_CreateJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_CreateJob] +// [END transcoder_v1beta1_generated_TranscoderService_CreateJob_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJobTemplate/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJobTemplate/main.go index 7be53e9f564..6d5352b8691 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJobTemplate/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/CreateJobTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_CreateJobTemplate] +// [START transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_CreateJobTemplate] +// [END transcoder_v1beta1_generated_TranscoderService_CreateJobTemplate_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJob/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJob/main.go index 7be3a1c9b6e..64890b8e8ce 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJob/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_DeleteJob] +// [START transcoder_v1beta1_generated_TranscoderService_DeleteJob_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_DeleteJob] +// [END transcoder_v1beta1_generated_TranscoderService_DeleteJob_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJobTemplate/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJobTemplate/main.go index da157c22e74..40a3c7353d4 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJobTemplate/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/DeleteJobTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_DeleteJobTemplate] +// [START transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_DeleteJobTemplate] +// [END transcoder_v1beta1_generated_TranscoderService_DeleteJobTemplate_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJob/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJob/main.go index 4d38969990e..9291db4422f 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJob/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJob/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_GetJob] +// [START transcoder_v1beta1_generated_TranscoderService_GetJob_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_GetJob] +// [END transcoder_v1beta1_generated_TranscoderService_GetJob_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJobTemplate/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJobTemplate/main.go index 35a8e26aebc..0eafb358f50 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJobTemplate/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/GetJobTemplate/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_GetJobTemplate] +// [START transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_GetJobTemplate] +// [END transcoder_v1beta1_generated_TranscoderService_GetJobTemplate_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobTemplates/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobTemplates/main.go index bee56c33d6c..bfce95c4a8b 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobTemplates/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobTemplates/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_ListJobTemplates] +// [START transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_ListJobTemplates] +// [END transcoder_v1beta1_generated_TranscoderService_ListJobTemplates_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobs/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobs/main.go index 6e9fd3c1a56..9ca6c66031e 100644 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobs/main.go +++ b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/ListJobs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START transcoder_generated_video_transcoder_apiv1beta1_Client_ListJobs] +// [START transcoder_v1beta1_generated_TranscoderService_ListJobs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END transcoder_generated_video_transcoder_apiv1beta1_Client_ListJobs] +// [END transcoder_v1beta1_generated_TranscoderService_ListJobs_sync] diff --git a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/NewClient/main.go b/internal/generated/snippets/video/transcoder/apiv1beta1/Client/NewClient/main.go deleted file mode 100644 index 8b7739258ae..00000000000 --- a/internal/generated/snippets/video/transcoder/apiv1beta1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START transcoder_generated_video_transcoder_apiv1beta1_NewClient] - -package main - -import ( - "context" - - transcoder "cloud.google.com/go/video/transcoder/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := transcoder.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END transcoder_generated_video_transcoder_apiv1beta1_NewClient] diff --git a/internal/generated/snippets/videointelligence/apiv1/Client/AnnotateVideo/main.go b/internal/generated/snippets/videointelligence/apiv1/Client/AnnotateVideo/main.go index 71cb116ec79..32f89f9c988 100644 --- a/internal/generated/snippets/videointelligence/apiv1/Client/AnnotateVideo/main.go +++ b/internal/generated/snippets/videointelligence/apiv1/Client/AnnotateVideo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START videointelligence_generated_videointelligence_apiv1_Client_AnnotateVideo] +// [START videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END videointelligence_generated_videointelligence_apiv1_Client_AnnotateVideo] +// [END videointelligence_v1_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/internal/generated/snippets/videointelligence/apiv1/Client/NewClient/main.go b/internal/generated/snippets/videointelligence/apiv1/Client/NewClient/main.go deleted file mode 100644 index 5b2a0b79d3c..00000000000 --- a/internal/generated/snippets/videointelligence/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START videointelligence_generated_videointelligence_apiv1_NewClient] - -package main - -import ( - "context" - - videointelligence "cloud.google.com/go/videointelligence/apiv1" -) - -func main() { - ctx := context.Background() - c, err := videointelligence.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END videointelligence_generated_videointelligence_apiv1_NewClient] diff --git a/internal/generated/snippets/videointelligence/apiv1beta2/Client/AnnotateVideo/main.go b/internal/generated/snippets/videointelligence/apiv1beta2/Client/AnnotateVideo/main.go index 5810987d21a..222c33e1f99 100644 --- a/internal/generated/snippets/videointelligence/apiv1beta2/Client/AnnotateVideo/main.go +++ b/internal/generated/snippets/videointelligence/apiv1beta2/Client/AnnotateVideo/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START videointelligence_generated_videointelligence_apiv1beta2_Client_AnnotateVideo] +// [START videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END videointelligence_generated_videointelligence_apiv1beta2_Client_AnnotateVideo] +// [END videointelligence_v1beta2_generated_VideoIntelligenceService_AnnotateVideo_sync] diff --git a/internal/generated/snippets/videointelligence/apiv1beta2/Client/NewClient/main.go b/internal/generated/snippets/videointelligence/apiv1beta2/Client/NewClient/main.go deleted file mode 100644 index 6fc6819fd1b..00000000000 --- a/internal/generated/snippets/videointelligence/apiv1beta2/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START videointelligence_generated_videointelligence_apiv1beta2_NewClient] - -package main - -import ( - "context" - - videointelligence "cloud.google.com/go/videointelligence/apiv1beta2" -) - -func main() { - ctx := context.Background() - c, err := videointelligence.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END videointelligence_generated_videointelligence_apiv1beta2_NewClient] diff --git a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AnnotateImage/main.go b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AnnotateImage/main.go deleted file mode 100644 index 2a11630e1a3..00000000000 --- a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AnnotateImage/main.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START vision_generated_vision_apiv1_ImageAnnotatorClient_AnnotateImage] - -package main - -import ( - "context" - - vision "cloud.google.com/go/vision/apiv1" - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" -) - -func main() { - ctx := context.Background() - c, err := vision.NewImageAnnotatorClient(ctx) - if err != nil { - // TODO: Handle error. - } - res, err := c.AnnotateImage(ctx, &pb.AnnotateImageRequest{ - Image: vision.NewImageFromURI("gs://my-bucket/my-image.png"), - Features: []*pb.Feature{ - {Type: pb.Feature_LANDMARK_DETECTION, MaxResults: 5}, - {Type: pb.Feature_LABEL_DETECTION, MaxResults: 3}, - }, - }) - if err != nil { - // TODO: Handle error. - } - // TODO: Use res. - _ = res -} - -// [END vision_generated_vision_apiv1_ImageAnnotatorClient_AnnotateImage] diff --git a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateFiles/main.go b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateFiles/main.go index 40c6e1ba517..54b5b26b6af 100644 --- a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateFiles/main.go +++ b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateFiles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ImageAnnotatorClient_AsyncBatchAnnotateFiles] +// [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ImageAnnotatorClient_AsyncBatchAnnotateFiles] +// [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_sync] diff --git a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateImages/main.go b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateImages/main.go index 5fff60eb459..61c9a0d602b 100644 --- a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateImages/main.go +++ b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/AsyncBatchAnnotateImages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ImageAnnotatorClient_AsyncBatchAnnotateImages] +// [START vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ImageAnnotatorClient_AsyncBatchAnnotateImages] +// [END vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_sync] diff --git a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateFiles/main.go b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateFiles/main.go index acbe04e0919..484d07937e6 100644 --- a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateFiles/main.go +++ b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateFiles/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ImageAnnotatorClient_BatchAnnotateFiles] +// [START vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ImageAnnotatorClient_BatchAnnotateFiles] +// [END vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_sync] diff --git a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateImages/main.go b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateImages/main.go index 29f41ae7cf1..0d531647d7b 100644 --- a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateImages/main.go +++ b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/BatchAnnotateImages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ImageAnnotatorClient_BatchAnnotateImages] +// [START vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ImageAnnotatorClient_BatchAnnotateImages] +// [END vision_v1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/NewImageAnnotatorClient/main.go b/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/NewImageAnnotatorClient/main.go deleted file mode 100644 index 916b307cf70..00000000000 --- a/internal/generated/snippets/vision/apiv1/ImageAnnotatorClient/NewImageAnnotatorClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START vision_generated_vision_apiv1_NewImageAnnotatorClient] - -package main - -import ( - "context" - - vision "cloud.google.com/go/vision/apiv1" -) - -func main() { - ctx := context.Background() - c, err := vision.NewImageAnnotatorClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END vision_generated_vision_apiv1_NewImageAnnotatorClient] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/AddProductToProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/AddProductToProductSet/main.go index b8af316f964..9eed5da2ba5 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/AddProductToProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/AddProductToProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_AddProductToProductSet] +// [START vision_v1_generated_ProductSearch_AddProductToProductSet_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_AddProductToProductSet] +// [END vision_v1_generated_ProductSearch_AddProductToProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProduct/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProduct/main.go index ccf40863b13..79997ed2beb 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProduct/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_CreateProduct] +// [START vision_v1_generated_ProductSearch_CreateProduct_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_CreateProduct] +// [END vision_v1_generated_ProductSearch_CreateProduct_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProductSet/main.go index 6635eff120b..b76623308ff 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_CreateProductSet] +// [START vision_v1_generated_ProductSearch_CreateProductSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_CreateProductSet] +// [END vision_v1_generated_ProductSearch_CreateProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateReferenceImage/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateReferenceImage/main.go index 4c4e7439910..b057f8af06f 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateReferenceImage/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/CreateReferenceImage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_CreateReferenceImage] +// [START vision_v1_generated_ProductSearch_CreateReferenceImage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_CreateReferenceImage] +// [END vision_v1_generated_ProductSearch_CreateReferenceImage_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProduct/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProduct/main.go index 233dd8a7736..1c27fdb66d7 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProduct/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_DeleteProduct] +// [START vision_v1_generated_ProductSearch_DeleteProduct_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_DeleteProduct] +// [END vision_v1_generated_ProductSearch_DeleteProduct_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProductSet/main.go index 5fd1b0a26b7..a37b9e93928 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_DeleteProductSet] +// [START vision_v1_generated_ProductSearch_DeleteProductSet_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_DeleteProductSet] +// [END vision_v1_generated_ProductSearch_DeleteProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteReferenceImage/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteReferenceImage/main.go index f115d3bafd4..736bc8283db 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteReferenceImage/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/DeleteReferenceImage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_DeleteReferenceImage] +// [START vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_DeleteReferenceImage] +// [END vision_v1_generated_ProductSearch_DeleteReferenceImage_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProduct/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProduct/main.go index eb18b1ac5d4..00209617ae4 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProduct/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_GetProduct] +// [START vision_v1_generated_ProductSearch_GetProduct_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_GetProduct] +// [END vision_v1_generated_ProductSearch_GetProduct_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProductSet/main.go index f4a642c3cdb..58bcea2a0ba 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_GetProductSet] +// [START vision_v1_generated_ProductSearch_GetProductSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_GetProductSet] +// [END vision_v1_generated_ProductSearch_GetProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetReferenceImage/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetReferenceImage/main.go index ed403d0c82a..9566db2eca1 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetReferenceImage/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/GetReferenceImage/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_GetReferenceImage] +// [START vision_v1_generated_ProductSearch_GetReferenceImage_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_GetReferenceImage] +// [END vision_v1_generated_ProductSearch_GetReferenceImage_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ImportProductSets/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ImportProductSets/main.go index 85c8c8632d7..994d9330289 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ImportProductSets/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ImportProductSets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_ImportProductSets] +// [START vision_v1_generated_ProductSearch_ImportProductSets_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_ImportProductSets] +// [END vision_v1_generated_ProductSearch_ImportProductSets_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductSets/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductSets/main.go index e5d57efcb04..9d8d7abdf3c 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductSets/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductSets/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_ListProductSets] +// [START vision_v1_generated_ProductSearch_ListProductSets_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_ListProductSets] +// [END vision_v1_generated_ProductSearch_ListProductSets_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProducts/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProducts/main.go index 2d57f72cc65..edb62bd2021 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProducts/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProducts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_ListProducts] +// [START vision_v1_generated_ProductSearch_ListProducts_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_ListProducts] +// [END vision_v1_generated_ProductSearch_ListProducts_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductsInProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductsInProductSet/main.go index 6035f08175a..52dfdb93089 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductsInProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListProductsInProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_ListProductsInProductSet] +// [START vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_ListProductsInProductSet] +// [END vision_v1_generated_ProductSearch_ListProductsInProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListReferenceImages/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListReferenceImages/main.go index 3f87de8da6e..dbf7ff07a88 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListReferenceImages/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/ListReferenceImages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_ListReferenceImages] +// [START vision_v1_generated_ProductSearch_ListReferenceImages_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_ListReferenceImages] +// [END vision_v1_generated_ProductSearch_ListReferenceImages_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/NewProductSearchClient/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/NewProductSearchClient/main.go deleted file mode 100644 index 31db9192200..00000000000 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/NewProductSearchClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START vision_generated_vision_apiv1_NewProductSearchClient] - -package main - -import ( - "context" - - vision "cloud.google.com/go/vision/apiv1" -) - -func main() { - ctx := context.Background() - c, err := vision.NewProductSearchClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END vision_generated_vision_apiv1_NewProductSearchClient] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/PurgeProducts/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/PurgeProducts/main.go index 8d190de875c..0779c1dfa16 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/PurgeProducts/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/PurgeProducts/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_PurgeProducts] +// [START vision_v1_generated_ProductSearch_PurgeProducts_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_PurgeProducts] +// [END vision_v1_generated_ProductSearch_PurgeProducts_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/RemoveProductFromProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/RemoveProductFromProductSet/main.go index 35a15a09457..5a46e149bb6 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/RemoveProductFromProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/RemoveProductFromProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_RemoveProductFromProductSet] +// [START vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END vision_generated_vision_apiv1_ProductSearchClient_RemoveProductFromProductSet] +// [END vision_v1_generated_ProductSearch_RemoveProductFromProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProduct/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProduct/main.go index 4f82e087b79..d6b30735127 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProduct/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProduct/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_UpdateProduct] +// [START vision_v1_generated_ProductSearch_UpdateProduct_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_UpdateProduct] +// [END vision_v1_generated_ProductSearch_UpdateProduct_sync] diff --git a/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProductSet/main.go b/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProductSet/main.go index 1d5346b5bae..3d045216458 100644 --- a/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProductSet/main.go +++ b/internal/generated/snippets/vision/apiv1/ProductSearchClient/UpdateProductSet/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1_ProductSearchClient_UpdateProductSet] +// [START vision_v1_generated_ProductSearch_UpdateProductSet_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1_ProductSearchClient_UpdateProductSet] +// [END vision_v1_generated_ProductSearch_UpdateProductSet_sync] diff --git a/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/BatchAnnotateImages/main.go b/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/BatchAnnotateImages/main.go index 2c796d0a2e8..0a0e1c014aa 100644 --- a/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/BatchAnnotateImages/main.go +++ b/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/BatchAnnotateImages/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START vision_generated_vision_apiv1p1beta1_ImageAnnotatorClient_BatchAnnotateImages] +// [START vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END vision_generated_vision_apiv1p1beta1_ImageAnnotatorClient_BatchAnnotateImages] +// [END vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_sync] diff --git a/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/NewImageAnnotatorClient/main.go b/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/NewImageAnnotatorClient/main.go deleted file mode 100644 index 67a5afc1b9b..00000000000 --- a/internal/generated/snippets/vision/apiv1p1beta1/ImageAnnotatorClient/NewImageAnnotatorClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START vision_generated_vision_apiv1p1beta1_NewImageAnnotatorClient] - -package main - -import ( - "context" - - vision "cloud.google.com/go/vision/apiv1p1beta1" -) - -func main() { - ctx := context.Background() - c, err := vision.NewImageAnnotatorClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END vision_generated_vision_apiv1p1beta1_NewImageAnnotatorClient] diff --git a/internal/generated/snippets/webrisk/apiv1/Client/ComputeThreatListDiff/main.go b/internal/generated/snippets/webrisk/apiv1/Client/ComputeThreatListDiff/main.go index 0345bfc0615..095cab7b165 100644 --- a/internal/generated/snippets/webrisk/apiv1/Client/ComputeThreatListDiff/main.go +++ b/internal/generated/snippets/webrisk/apiv1/Client/ComputeThreatListDiff/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1_Client_ComputeThreatListDiff] +// [START webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1_Client_ComputeThreatListDiff] +// [END webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/internal/generated/snippets/webrisk/apiv1/Client/CreateSubmission/main.go b/internal/generated/snippets/webrisk/apiv1/Client/CreateSubmission/main.go index fdc0abedf62..2cd9a12e8d8 100644 --- a/internal/generated/snippets/webrisk/apiv1/Client/CreateSubmission/main.go +++ b/internal/generated/snippets/webrisk/apiv1/Client/CreateSubmission/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1_Client_CreateSubmission] +// [START webrisk_v1_generated_WebRiskService_CreateSubmission_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1_Client_CreateSubmission] +// [END webrisk_v1_generated_WebRiskService_CreateSubmission_sync] diff --git a/internal/generated/snippets/webrisk/apiv1/Client/NewClient/main.go b/internal/generated/snippets/webrisk/apiv1/Client/NewClient/main.go deleted file mode 100644 index d73629e3e75..00000000000 --- a/internal/generated/snippets/webrisk/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START webrisk_generated_webrisk_apiv1_NewClient] - -package main - -import ( - "context" - - webrisk "cloud.google.com/go/webrisk/apiv1" -) - -func main() { - ctx := context.Background() - c, err := webrisk.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END webrisk_generated_webrisk_apiv1_NewClient] diff --git a/internal/generated/snippets/webrisk/apiv1/Client/SearchHashes/main.go b/internal/generated/snippets/webrisk/apiv1/Client/SearchHashes/main.go index 1615828484e..75e35a8d633 100644 --- a/internal/generated/snippets/webrisk/apiv1/Client/SearchHashes/main.go +++ b/internal/generated/snippets/webrisk/apiv1/Client/SearchHashes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1_Client_SearchHashes] +// [START webrisk_v1_generated_WebRiskService_SearchHashes_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1_Client_SearchHashes] +// [END webrisk_v1_generated_WebRiskService_SearchHashes_sync] diff --git a/internal/generated/snippets/webrisk/apiv1/Client/SearchUris/main.go b/internal/generated/snippets/webrisk/apiv1/Client/SearchUris/main.go index fcacefb9c98..ee80b660a8e 100644 --- a/internal/generated/snippets/webrisk/apiv1/Client/SearchUris/main.go +++ b/internal/generated/snippets/webrisk/apiv1/Client/SearchUris/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1_Client_SearchUris] +// [START webrisk_v1_generated_WebRiskService_SearchUris_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1_Client_SearchUris] +// [END webrisk_v1_generated_WebRiskService_SearchUris_sync] diff --git a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/ComputeThreatListDiff/main.go b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/ComputeThreatListDiff/main.go index fd443907bbf..e989f7748bb 100644 --- a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/ComputeThreatListDiff/main.go +++ b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/ComputeThreatListDiff/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1beta1_WebRiskServiceV1Beta1Client_ComputeThreatListDiff] +// [START webrisk_v1beta1_generated_WebRiskServiceV1Beta1_ComputeThreatListDiff_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1beta1_WebRiskServiceV1Beta1Client_ComputeThreatListDiff] +// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_ComputeThreatListDiff_sync] diff --git a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/NewWebRiskServiceV1Beta1Client/main.go b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/NewWebRiskServiceV1Beta1Client/main.go deleted file mode 100644 index 04f9bc43d65..00000000000 --- a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/NewWebRiskServiceV1Beta1Client/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START webrisk_generated_webrisk_apiv1beta1_NewWebRiskServiceV1Beta1Client] - -package main - -import ( - "context" - - webrisk "cloud.google.com/go/webrisk/apiv1beta1" -) - -func main() { - ctx := context.Background() - c, err := webrisk.NewWebRiskServiceV1Beta1Client(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END webrisk_generated_webrisk_apiv1beta1_NewWebRiskServiceV1Beta1Client] diff --git a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchHashes/main.go b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchHashes/main.go index 430dc956502..8b406e26acd 100644 --- a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchHashes/main.go +++ b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchHashes/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1beta1_WebRiskServiceV1Beta1Client_SearchHashes] +// [START webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchHashes_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1beta1_WebRiskServiceV1Beta1Client_SearchHashes] +// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchHashes_sync] diff --git a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchUris/main.go b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchUris/main.go index 37fc033d75e..6b3e870e2bc 100644 --- a/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchUris/main.go +++ b/internal/generated/snippets/webrisk/apiv1beta1/WebRiskServiceV1Beta1Client/SearchUris/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START webrisk_generated_webrisk_apiv1beta1_WebRiskServiceV1Beta1Client_SearchUris] +// [START webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchUris_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END webrisk_generated_webrisk_apiv1beta1_WebRiskServiceV1Beta1Client_SearchUris] +// [END webrisk_v1beta1_generated_WebRiskServiceV1Beta1_SearchUris_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/CreateScanConfig/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/CreateScanConfig/main.go index 2c73bdf4241..22afc18bdd2 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/CreateScanConfig/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/CreateScanConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_CreateScanConfig] +// [START websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_CreateScanConfig] +// [END websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/DeleteScanConfig/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/DeleteScanConfig/main.go index 4db24123c12..7647ab37022 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/DeleteScanConfig/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/DeleteScanConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_DeleteScanConfig] +// [START websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] package main @@ -39,4 +39,4 @@ func main() { } } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_DeleteScanConfig] +// [END websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/GetFinding/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/GetFinding/main.go index 3444f300e99..a0216cc6c91 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/GetFinding/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/GetFinding/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_GetFinding] +// [START websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_GetFinding] +// [END websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanConfig/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanConfig/main.go index d4406022567..8a6b47b54e1 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanConfig/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_GetScanConfig] +// [START websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_GetScanConfig] +// [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanRun/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanRun/main.go index e21cd370322..111decbb850 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanRun/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/GetScanRun/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_GetScanRun] +// [START websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_GetScanRun] +// [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListCrawledUrls/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListCrawledUrls/main.go index 83233dbf84b..71096d5224c 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListCrawledUrls/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListCrawledUrls/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_ListCrawledUrls] +// [START websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_ListCrawledUrls] +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindingTypeStats/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindingTypeStats/main.go index 667b253206a..57a340c0fbd 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindingTypeStats/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindingTypeStats/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_ListFindingTypeStats] +// [START websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_ListFindingTypeStats] +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindings/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindings/main.go index 25c3d38a44d..e2eac65cf69 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindings/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListFindings/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_ListFindings] +// [START websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_ListFindings] +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanConfigs/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanConfigs/main.go index 8a7c636e88e..9790fd1bc3c 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanConfigs/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanConfigs/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_ListScanConfigs] +// [START websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_ListScanConfigs] +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanRuns/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanRuns/main.go index ea77345fd68..a2722ba87d0 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanRuns/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/ListScanRuns/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_ListScanRuns] +// [START websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_ListScanRuns] +// [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/NewClient/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/NewClient/main.go deleted file mode 100644 index 863a17e6ede..00000000000 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START websecurityscanner_generated_websecurityscanner_apiv1_NewClient] - -package main - -import ( - "context" - - websecurityscanner "cloud.google.com/go/websecurityscanner/apiv1" -) - -func main() { - ctx := context.Background() - c, err := websecurityscanner.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END websecurityscanner_generated_websecurityscanner_apiv1_NewClient] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/StartScanRun/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/StartScanRun/main.go index 9bece6d841c..df1098a1aff 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/StartScanRun/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/StartScanRun/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_StartScanRun] +// [START websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_StartScanRun] +// [END websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/StopScanRun/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/StopScanRun/main.go index d5e4a8b6581..b7906157275 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/StopScanRun/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/StopScanRun/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_StopScanRun] +// [START websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_StopScanRun] +// [END websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/internal/generated/snippets/websecurityscanner/apiv1/Client/UpdateScanConfig/main.go b/internal/generated/snippets/websecurityscanner/apiv1/Client/UpdateScanConfig/main.go index c9b26de2754..9574fbfde94 100644 --- a/internal/generated/snippets/websecurityscanner/apiv1/Client/UpdateScanConfig/main.go +++ b/internal/generated/snippets/websecurityscanner/apiv1/Client/UpdateScanConfig/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START websecurityscanner_generated_websecurityscanner_apiv1_Client_UpdateScanConfig] +// [START websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END websecurityscanner_generated_websecurityscanner_apiv1_Client_UpdateScanConfig] +// [END websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/internal/generated/snippets/workflows/apiv1beta/Client/CreateWorkflow/main.go b/internal/generated/snippets/workflows/apiv1beta/Client/CreateWorkflow/main.go index 0a2d96b8b39..6811f025bd6 100644 --- a/internal/generated/snippets/workflows/apiv1beta/Client/CreateWorkflow/main.go +++ b/internal/generated/snippets/workflows/apiv1beta/Client/CreateWorkflow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflows_generated_workflows_apiv1beta_Client_CreateWorkflow] +// [START workflows_v1beta_generated_Workflows_CreateWorkflow_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END workflows_generated_workflows_apiv1beta_Client_CreateWorkflow] +// [END workflows_v1beta_generated_Workflows_CreateWorkflow_sync] diff --git a/internal/generated/snippets/workflows/apiv1beta/Client/DeleteWorkflow/main.go b/internal/generated/snippets/workflows/apiv1beta/Client/DeleteWorkflow/main.go index d3c188bb66c..50d1f798f3c 100644 --- a/internal/generated/snippets/workflows/apiv1beta/Client/DeleteWorkflow/main.go +++ b/internal/generated/snippets/workflows/apiv1beta/Client/DeleteWorkflow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflows_generated_workflows_apiv1beta_Client_DeleteWorkflow] +// [START workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] package main @@ -46,4 +46,4 @@ func main() { } } -// [END workflows_generated_workflows_apiv1beta_Client_DeleteWorkflow] +// [END workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] diff --git a/internal/generated/snippets/workflows/apiv1beta/Client/GetWorkflow/main.go b/internal/generated/snippets/workflows/apiv1beta/Client/GetWorkflow/main.go index 5971088a373..45b221765a9 100644 --- a/internal/generated/snippets/workflows/apiv1beta/Client/GetWorkflow/main.go +++ b/internal/generated/snippets/workflows/apiv1beta/Client/GetWorkflow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflows_generated_workflows_apiv1beta_Client_GetWorkflow] +// [START workflows_v1beta_generated_Workflows_GetWorkflow_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END workflows_generated_workflows_apiv1beta_Client_GetWorkflow] +// [END workflows_v1beta_generated_Workflows_GetWorkflow_sync] diff --git a/internal/generated/snippets/workflows/apiv1beta/Client/ListWorkflows/main.go b/internal/generated/snippets/workflows/apiv1beta/Client/ListWorkflows/main.go index 31f22e8585b..05dd579c572 100644 --- a/internal/generated/snippets/workflows/apiv1beta/Client/ListWorkflows/main.go +++ b/internal/generated/snippets/workflows/apiv1beta/Client/ListWorkflows/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflows_generated_workflows_apiv1beta_Client_ListWorkflows] +// [START workflows_v1beta_generated_Workflows_ListWorkflows_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END workflows_generated_workflows_apiv1beta_Client_ListWorkflows] +// [END workflows_v1beta_generated_Workflows_ListWorkflows_sync] diff --git a/internal/generated/snippets/workflows/apiv1beta/Client/NewClient/main.go b/internal/generated/snippets/workflows/apiv1beta/Client/NewClient/main.go deleted file mode 100644 index 6c245c09689..00000000000 --- a/internal/generated/snippets/workflows/apiv1beta/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START workflows_generated_workflows_apiv1beta_NewClient] - -package main - -import ( - "context" - - workflows "cloud.google.com/go/workflows/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := workflows.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END workflows_generated_workflows_apiv1beta_NewClient] diff --git a/internal/generated/snippets/workflows/apiv1beta/Client/UpdateWorkflow/main.go b/internal/generated/snippets/workflows/apiv1beta/Client/UpdateWorkflow/main.go index 14ef851b6c0..91d0628d765 100644 --- a/internal/generated/snippets/workflows/apiv1beta/Client/UpdateWorkflow/main.go +++ b/internal/generated/snippets/workflows/apiv1beta/Client/UpdateWorkflow/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflows_generated_workflows_apiv1beta_Client_UpdateWorkflow] +// [START workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] package main @@ -48,4 +48,4 @@ func main() { _ = resp } -// [END workflows_generated_workflows_apiv1beta_Client_UpdateWorkflow] +// [END workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] diff --git a/internal/generated/snippets/workflows/executions/apiv1beta/Client/CancelExecution/main.go b/internal/generated/snippets/workflows/executions/apiv1beta/Client/CancelExecution/main.go index 77ad33cdb60..4143993a6b3 100644 --- a/internal/generated/snippets/workflows/executions/apiv1beta/Client/CancelExecution/main.go +++ b/internal/generated/snippets/workflows/executions/apiv1beta/Client/CancelExecution/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflowexecutions_generated_workflows_executions_apiv1beta_Client_CancelExecution] +// [START workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END workflowexecutions_generated_workflows_executions_apiv1beta_Client_CancelExecution] +// [END workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] diff --git a/internal/generated/snippets/workflows/executions/apiv1beta/Client/CreateExecution/main.go b/internal/generated/snippets/workflows/executions/apiv1beta/Client/CreateExecution/main.go index dc3bdeb30ac..473fec7bd24 100644 --- a/internal/generated/snippets/workflows/executions/apiv1beta/Client/CreateExecution/main.go +++ b/internal/generated/snippets/workflows/executions/apiv1beta/Client/CreateExecution/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflowexecutions_generated_workflows_executions_apiv1beta_Client_CreateExecution] +// [START workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END workflowexecutions_generated_workflows_executions_apiv1beta_Client_CreateExecution] +// [END workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] diff --git a/internal/generated/snippets/workflows/executions/apiv1beta/Client/GetExecution/main.go b/internal/generated/snippets/workflows/executions/apiv1beta/Client/GetExecution/main.go index c928c66f409..f1d14e95a9c 100644 --- a/internal/generated/snippets/workflows/executions/apiv1beta/Client/GetExecution/main.go +++ b/internal/generated/snippets/workflows/executions/apiv1beta/Client/GetExecution/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflowexecutions_generated_workflows_executions_apiv1beta_Client_GetExecution] +// [START workflowexecutions_v1beta_generated_Executions_GetExecution_sync] package main @@ -43,4 +43,4 @@ func main() { _ = resp } -// [END workflowexecutions_generated_workflows_executions_apiv1beta_Client_GetExecution] +// [END workflowexecutions_v1beta_generated_Executions_GetExecution_sync] diff --git a/internal/generated/snippets/workflows/executions/apiv1beta/Client/ListExecutions/main.go b/internal/generated/snippets/workflows/executions/apiv1beta/Client/ListExecutions/main.go index a55063ab879..dda4cda6983 100644 --- a/internal/generated/snippets/workflows/executions/apiv1beta/Client/ListExecutions/main.go +++ b/internal/generated/snippets/workflows/executions/apiv1beta/Client/ListExecutions/main.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// [START workflowexecutions_generated_workflows_executions_apiv1beta_Client_ListExecutions] +// [START workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] package main @@ -51,4 +51,4 @@ func main() { } } -// [END workflowexecutions_generated_workflows_executions_apiv1beta_Client_ListExecutions] +// [END workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] diff --git a/internal/generated/snippets/workflows/executions/apiv1beta/Client/NewClient/main.go b/internal/generated/snippets/workflows/executions/apiv1beta/Client/NewClient/main.go deleted file mode 100644 index f2c53977efb..00000000000 --- a/internal/generated/snippets/workflows/executions/apiv1beta/Client/NewClient/main.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// [START workflowexecutions_generated_workflows_executions_apiv1beta_NewClient] - -package main - -import ( - "context" - - executions "cloud.google.com/go/workflows/executions/apiv1beta" -) - -func main() { - ctx := context.Background() - c, err := executions.NewClient(ctx) - if err != nil { - // TODO: Handle error. - } - // TODO: Use client. - _ = c -} - -// [END workflowexecutions_generated_workflows_executions_apiv1beta_NewClient]